problems with the command Spli()

eddynator

New Member
in asp i can change a variable like<BR>xx="1,2,3"<BR><BR>into<BR><BR>z(0)=1<BR>z(1)=2<BR>z(2)=3<BR><BR>by usig the command<BR><BR>z = split(x,",")<BR><BR>but in asp.net, when i do this, it give me an error instead.<BR><BR>System.InvalidCastException: Type mismatch<BR><BR>maybe the variable "z" is not declared correctly perhaps? how to declared the variable z correctly then?<BR><BR>i try "Dim z(3) as string" but to no avail.<BR><BR>Thank you.I've never used Split() in ASP.NET however there is an example of this in the Global.asax doc's for the IBuySpy Portal demo.<BR><BR>http://www.ibuyspy.com/PortalVB/sourceviewer/srcview.aspx?path=globalasax.src&file=Global.asax&rows=2 <BR><BR>Look in the Application_AuthenticateRequest Event Handler.<BR><BR>Failing that RTFM...<BR><BR>http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemstringclasssplittopic1.asp?frame=true
 
Back
Top