String Array in ViewState???

G

Guest

Hey guys,

Can anyone tell me how I can do THIS (see code below) but in a STRING
ARRAY instead? I really appreciate any help. I'm using C# in VS2005.


public int intTotal
{
get
{
object value = ViewState["intTotal"];
return value == null ? 0 /* default value */ : (int)value;
}
set
{
ViewState["intTotal"] = value;
}
}




Thanks!!!

Todd
 
G

Guest

Hi Todd,

It should look like this:

public string[] MyStringArray
{
get
{
object value = ViewState["MyStringArray"];
return (string[]) value;
}
set
{
ViewState["MyStringArray"] = value;
}
}

Best Regards,
 
G

Guest

Thanks!!!

Jorgebg said:
Hi Todd,

It should look like this:

public string[] MyStringArray
{
get
{
object value = ViewState["MyStringArray"];
return (string[]) value;
}
set
{
ViewState["MyStringArray"] = value;
}
}

Best Regards,
--
Jorgebg - MCSD.NET


Todd Jaspers said:
Hey guys,

Can anyone tell me how I can do THIS (see code below) but in a STRING
ARRAY instead? I really appreciate any help. I'm using C# in VS2005.


public int intTotal
{
get
{
object value = ViewState["intTotal"];
return value == null ? 0 /* default value */ : (int)value;
}
set
{
ViewState["intTotal"] = value;
}
}




Thanks!!!

Todd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top