locked
How to use public variable which used in whole ASP.NET web application RRS feed

  • Question

  • User1098555886 posted

    Hi All,
    How to use public variable in Asp.NET with vb, in my web application i have class fils,aspx and asmx file, in this all pages i need access one public variable which i assign when user login, if i use session i cant access in asmx and class files, if i declare public variable in class file once page refresh it clear the assign values and became empty.

    i want assign public variable with values and access in whole application until user logout, and once assign values when login it never change.

    This is for connection sting , i know can declare in web conig, but we create each sql login for each and every user, so when user login we pass username to sql User ID.

    What I have tried:

    For now i declare static variable and used in same page itself.If asp page no problem, but from class and asmx i need to each function connection strings.

    Regards,
    Aravind

    Thursday, January 31, 2019 6:56 AM

All replies