MisterMacro Posted September 13, 2005 Posted September 13, 2005 I have a Web Project in which I am holding a few key (Public) variables in a Module. The issue is that when two or more users are on the site or page the variables do not stick with the correct user. One user is getting the others variables. How do I fix this? I do not want to keep passing multiple variables through .aspx pages. That is why I used the module to contain them, but they do not stay with the correct user. Any Ideas? :mad: Quote
Administrators PlausiblyDamp Posted September 13, 2005 Administrators Posted September 13, 2005 You may want to consider using Session variables or something similar Clicky may be worth a read Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MisterMacro Posted September 13, 2005 Author Posted September 13, 2005 You may want to consider using Session variables or something similar Clicky may be worth a read I actually have that sample. The problem lies within the Datagrid. I use a Hyperlink Column to connect to the other page and that is when all is lost and it assumes the variables of who else is on the site/page. Quote
bri189a Posted September 13, 2005 Posted September 13, 2005 Sounds like your using cache instead of session. No two users will EVER share the same session. Quote
MisterMacro Posted September 14, 2005 Author Posted September 14, 2005 Sounds like your using cache instead of session. No two users will EVER share the same session. How do you fix something like that? Is there a special setting on the Module itself that states this? I do not want to pass all the variables through the HTML/ASPX. They should be fine sitting as Public Variables on a Module Page but they tend to switch from user to user when 2 or more people are on that site/page. :mad: Quote
Administrators PlausiblyDamp Posted September 14, 2005 Administrators Posted September 14, 2005 You will need to use something other than a module, modules are designed to be shared / global. The methods I suggested before should cover your needs, if you have a problem with a specific piece of code not working then you might be better off posting that here to see if anyone can help. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MisterMacro Posted September 14, 2005 Author Posted September 14, 2005 Here is where it falls apart: HTML CODE: <Columns> <asp:HyperLinkColumn DataNavigateUrlField="Ticket_ID" DataNavigateUrlFormatString="WebForm2.aspx?Ticket_ID={0}" DataTextField="Ticket_ID" HeaderText="Ticket_ID"></asp:HyperLinkColumn> <asp:BoundColumn DataField="TICKET_STATUS" HeaderText="Status"></asp:BoundColumn> <asp:BoundColumn DataField="TICKET_ASSIGNED_TO" HeaderText="Assigned To"></asp:BoundColumn> <asp:BoundColumn DataField="IS_EMERGENCY" HeaderText="Emergency"></asp:BoundColumn> <asp:BoundColumn DataField="LAST_STATUS_UPDATE" HeaderText="Last Status Update"></asp:BoundColumn> <asp:BoundColumn DataField="LAST_STATUS_UPDATE_APP_USER" HeaderText="Last User"></asp:BoundColumn> <asp:BoundColumn DataField="DIG_NO" HeaderText="Dig No"></asp:BoundColumn> <asp:BoundColumn DataField="REV" HeaderText="Rev"></asp:BoundColumn> <asp:BoundColumn DataField="ADDRESS" HeaderText="Address"></asp:BoundColumn> <asp:BoundColumn DataField="PLACE" HeaderText="City"></asp:BoundColumn> <asp:BoundColumn DataField="DIG_START" HeaderText="Dig Start"></asp:BoundColumn> </Columns> If the Module can not decipher between user then I need to pass the Variable APP_USER along through the Hyperlink. On this page the Variable APP_USER is the value of label1. I do not know if you can pass Label1.text in the HTML code like you can with the VB code. Quote
MisterMacro Posted September 15, 2005 Author Posted September 15, 2005 Ok! How about a Compermise? Server.Transfer("WebForm2.aspx?T1=JACK&T2=JILL") What is the Syntax to make JACK Textbox.text and JILL Textbox2.text? I have tried but I can only get one variable across. Quote
Administrators PlausiblyDamp Posted September 15, 2005 Administrators Posted September 15, 2005 When you say I have tried but I can only get one variable across what code are you using? What errors occur? It is a lot easier for people to help if you give code samples etc. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MisterMacro Posted September 15, 2005 Author Posted September 15, 2005 Server.Transfer("WebForm2.aspx?T1=" & TextBox1.Text) The Above code works with One Varaible, the contents of Textbox1 Server.Transfer("WebForm2.aspx?T1=" & TextBox1.Text & "T2=" & TextBox1.Text) This code doesn't because it treats T2= as string and attaches it to the value of Textbox1 If I remove the "" or use + it errors in Syntax. How to I pass the values of Textbox1 into T1 and the value of Textbox2 into T2 and get it to format/Syntax correctly like Server.Transfer("WebForm2.aspx?T1=JACK&T2=JILL") Quote
Administrators PlausiblyDamp Posted September 15, 2005 Administrators Posted September 15, 2005 Try Server.Transfer("WebForm2.aspx?T1=" & TextBox1.Text & "&T2=" & TextBox1.Text) Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MisterMacro Posted September 19, 2005 Author Posted September 19, 2005 Server.Transfer("WebForm2.aspx?T1=" & TextBox1.Text) The Above code works with One Varaible, the contents of Textbox1 Server.Transfer("WebForm2.aspx?T1=" & TextBox1.Text & "T2=" & TextBox1.Text) This code doesn't because it treats T2= as string and attaches it to the value of Textbox1 If I remove the "" or use + it errors in Syntax. How to I pass the values of Textbox1 into T1 and the value of Textbox2 into T2 and get it to format/Syntax correctly like Server.Transfer("WebForm2.aspx?T1=JACK&T2=JILL") Quote
Administrators PlausiblyDamp Posted September 19, 2005 Administrators Posted September 19, 2005 Did you try the code from post 11? If so what failed - the sample you have posted differs from my sample. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.