|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Session variable as string (array)Hello,
I have a web project in Visual Basic 2005. I want to create a session variable in the "global.asax" file as an array of strings type. The syntax I use is the following: Session("MyArray")(10, 10) = "" but I get an error. I think that I don't know the syntax correctly. Someone knows it? Thanks, John. Just declare the variables as you normally do then set it to the session
object Session("MyArray")=VarHoldingArray to read it from session VarHoldingArray=Session("MyArray") regards Michel Posseth Show quoteHide quote "juan" <j***@discussions.microsoft.com> schreef in bericht news:2AD3B7B6-1A4B-4A4C-860F-BAFC108973C3@microsoft.com... > Hello, > I have a web project in Visual Basic 2005. I want to create a session > variable in the "global.asax" file as an array of strings type. The syntax > I > use is the following: > > Session("MyArray")(10, 10) = "" > > but I get an error. I think that I don't know the syntax correctly. > Someone > knows it? > Thanks, John. > yes, but how I say to Visual Basic 2005 that it is an array?
Thanks, John. Show quoteHide quote "Michel Posseth [MCP]" wrote: > > Just declare the variables as you normally do then set it to the session > object > > Session("MyArray")=VarHoldingArray > > to read it from session > > VarHoldingArray=Session("MyArray") > > regards > > > Michel Posseth > > > "juan" <j***@discussions.microsoft.com> schreef in bericht > news:2AD3B7B6-1A4B-4A4C-860F-BAFC108973C3@microsoft.com... > > Hello, > > I have a web project in Visual Basic 2005. I want to create a session > > variable in the "global.asax" file as an array of strings type. The syntax > > I > > use is the following: > > > > Session("MyArray")(10, 10) = "" > > > > but I get an error. I think that I don't know the syntax correctly. > > Someone > > knows it? > > Thanks, John. > > > > > Juan,
I don't think that it is clever to update the array in the session. Why don't you not as Michel tells you in fact do that outside that and add that than again to the session. Just my thought, Cor Show quoteHide quote "juan" <j***@discussions.microsoft.com> schreef in bericht news:BCEA720A-BACD-4EE8-95EF-2E3FE2E284F8@microsoft.com... > yes, but how I say to Visual Basic 2005 that it is an array? > Thanks, John. > > "Michel Posseth [MCP]" wrote: > >> >> Just declare the variables as you normally do then set it to the session >> object >> >> Session("MyArray")=VarHoldingArray >> >> to read it from session >> >> VarHoldingArray=Session("MyArray") >> >> regards >> >> >> Michel Posseth >> >> >> "juan" <j***@discussions.microsoft.com> schreef in bericht >> news:2AD3B7B6-1A4B-4A4C-860F-BAFC108973C3@microsoft.com... >> > Hello, >> > I have a web project in Visual Basic 2005. I want to create a session >> > variable in the "global.asax" file as an array of strings type. The >> > syntax >> > I >> > use is the following: >> > >> > Session("MyArray")(10, 10) = "" >> > >> > but I get an error. I think that I don't know the syntax correctly. >> > Someone >> > knows it? >> > Thanks, John. >> > >> >> >> I don't want to update de array in the session. Only say to Visual Basic 2005
that the variable is really an array with 2 dimensions of 10 elements each. I use this syntax: Session("MyArray")(10, 10) = "" Regards, John Show quoteHide quote "Cor Ligthert [MVP]" wrote: > Juan, > > I don't think that it is clever to update the array in the session. > Why don't you not as Michel tells you in fact do that outside that and add > that than again to the session. > > Just my thought, > > Cor > > "juan" <j***@discussions.microsoft.com> schreef in bericht > news:BCEA720A-BACD-4EE8-95EF-2E3FE2E284F8@microsoft.com... > > yes, but how I say to Visual Basic 2005 that it is an array? > > Thanks, John. > > > > "Michel Posseth [MCP]" wrote: > > > >> > >> Just declare the variables as you normally do then set it to the session > >> object > >> > >> Session("MyArray")=VarHoldingArray > >> > >> to read it from session > >> > >> VarHoldingArray=Session("MyArray") > >> > >> regards > >> > >> > >> Michel Posseth > >> > >> > >> "juan" <j***@discussions.microsoft.com> schreef in bericht > >> news:2AD3B7B6-1A4B-4A4C-860F-BAFC108973C3@microsoft.com... > >> > Hello, > >> > I have a web project in Visual Basic 2005. I want to create a session > >> > variable in the "global.asax" file as an array of strings type. The > >> > syntax > >> > I > >> > use is the following: > >> > > >> > Session("MyArray")(10, 10) = "" > >> > > >> > but I get an error. I think that I don't know the syntax correctly. > >> > Someone > >> > knows it? > >> > Thanks, John. > >> > > >> > >> > >> > > > Dim varHoldingArray(10, 10) As String
Session("MyArray") = varHoldingArray from our response you could have find the above solution regards Michel Posseth [MCP] Show quoteHide quote "juan" wrote: > I don't want to update de array in the session. Only say to Visual Basic 2005 > that the variable is really an array with 2 dimensions of 10 elements each. I > use this syntax: > > Session("MyArray")(10, 10) = "" > > Regards, John > > "Cor Ligthert [MVP]" wrote: > > > Juan, > > > > I don't think that it is clever to update the array in the session. > > Why don't you not as Michel tells you in fact do that outside that and add > > that than again to the session. > > > > Just my thought, > > > > Cor > > > > "juan" <j***@discussions.microsoft.com> schreef in bericht > > news:BCEA720A-BACD-4EE8-95EF-2E3FE2E284F8@microsoft.com... > > > yes, but how I say to Visual Basic 2005 that it is an array? > > > Thanks, John. > > > > > > "Michel Posseth [MCP]" wrote: > > > > > >> > > >> Just declare the variables as you normally do then set it to the session > > >> object > > >> > > >> Session("MyArray")=VarHoldingArray > > >> > > >> to read it from session > > >> > > >> VarHoldingArray=Session("MyArray") > > >> > > >> regards > > >> > > >> > > >> Michel Posseth > > >> > > >> > > >> "juan" <j***@discussions.microsoft.com> schreef in bericht > > >> news:2AD3B7B6-1A4B-4A4C-860F-BAFC108973C3@microsoft.com... > > >> > Hello, > > >> > I have a web project in Visual Basic 2005. I want to create a session > > >> > variable in the "global.asax" file as an array of strings type. The > > >> > syntax > > >> > I > > >> > use is the following: > > >> > > > >> > Session("MyArray")(10, 10) = "" > > >> > > > >> > but I get an error. I think that I don't know the syntax correctly. > > >> > Someone > > >> > knows it? > > >> > Thanks, John. > > >> > > > >> > > >> > > >> > > > > > >
updatecommand
int64 or double Design Question for Factory Pattern and Casting Types to read a textfile regarding his format Floating Menu Bar Adding modules from another project Advice on Training Getting the Parent firectory of a file using MDIList in a MDI form code convertor in VB.NET Express Edition |
|||||||||||||||||||||||