Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shared declaration. Is it always Global to all apps
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00827095
Message ID:
00827391
Views:
12
Thanks Cathi

Does this mean I should not use shared propeties to pass information between postbacks?
These shared properties remain in scope just fine, but I dont want them to be in scope for each browser instance.


>Hi Mark,
>
>ASP.NET is stateless in nature and therefore any information you need to retain after a page is refreshed needs to be stored explicitly. One way to save information is by using session state. You would assign a value or object to a session variable:
>
>
>Session["myvar"] = "my string";
>
>
>>Hello
>>
>>I working on my first ASP.net VB web form.
>>
>>My page is making use of some objects that vanish from scope unless I make them shared.
>>
>>However another programmer in my dept did this and he says that the shared variables ended up in scope for every instance of the application that was open.
>>
>>I just want all the procedures in my web page to have access to a single application specific and not interfere with other instances of my app.
>>
>>AS you can see I am very new to all this :)
>>
>>
>> Protected WithEvents Label12 As System.Web.UI.WebControls.Label
>> Protected WithEvents Textbox1 As System.Web.UI.WebControls.TextBox
>> Protected WithEvents ReviewButton As System.Web.UI.WebControls.Button
>>
>> Public objSess As New clsGetData_sess() ' Create the session object for this page
>> Protected WithEvents txtSystemTitle As System.Web.UI.WebControls.TextBox
>> Public oApp As Object
>> Public Shared oBizApp As Object 'DPBIZ.AppData()
>> Public Shared oAppRow As DataRow
>>
>>
>>Do I have to persist everything through sessions or what.
>>
>>
>>Confused of Brighton Uk
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform