This is a migrated thread and some comments may be shown as answers.

How to Use Session State/View state in user functions

0 Answers 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
smith spd
Top achievements
Rank 1
smith spd asked on 10 Sep 2010, 06:46 PM

Hello Telerik Team,

I have a requirement where i need to pass some values from another method to the user functions.
I found that we cant use viewstate in static methods..and user functions should be static always.
How can we use session state here .

The following code is:

public reportname()
        {

 foreach (SPListItem item in listItemsCollection)
            {
                string Type = item["Columnname"].ToString();

              
              
           }
}

 

 public static string FormType(string Type)
        {

           // string TypeVal = "AA";

          

            switch (Type)
            {
                case "AA":

                    Type = "Approved";

                    break;
               

            }

            return Type;

        }

In the above code i need to pass  "Type" value to the user function FormType.I appreciate your support.



Thank you,
Smith

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
smith spd
Top achievements
Rank 1
Share this question
or