hi guys , please can you tell me how can i declare a global variables ?
-
HI , please i need to declare some global variables like : public con as sqlconection public DtSet as Dataset but for condition to retrieve them in each page in ma web site , i sought a lot for that stuff & i've posted a lot of questions in some furoms but nobody gave me a convinced answer can you help me please ?
try to be good if you can't be the best
-
HI , please i need to declare some global variables like : public con as sqlconection public DtSet as Dataset but for condition to retrieve them in each page in ma web site , i sought a lot for that stuff & i've posted a lot of questions in some furoms but nobody gave me a convinced answer can you help me please ?
try to be good if you can't be the best
Use a data access layer
only two letters away from being an asset
-
HI , please i need to declare some global variables like : public con as sqlconection public DtSet as Dataset but for condition to retrieve them in each page in ma web site , i sought a lot for that stuff & i've posted a lot of questions in some furoms but nobody gave me a convinced answer can you help me please ?
try to be good if you can't be the best
You can create a class in App_Code and declare your variables as static. Hence if your class is called Database and u declared static con as sqlconnection, you can access this variable by doing: Database.conn
Live in fragments no longer. Only connect.
-
HI , please i need to declare some global variables like : public con as sqlconection public DtSet as Dataset but for condition to retrieve them in each page in ma web site , i sought a lot for that stuff & i've posted a lot of questions in some furoms but nobody gave me a convinced answer can you help me please ?
try to be good if you can't be the best
Mohammed, Try reading through the link titled How do I store global variables? http://steveorr.net/faq/GlobalVariables.aspx Some basic steps: 1. declare a variable as you would any variable in asp.net with the Dim command 2. somewhere in code, retrieve variable as a session variable For example, Dim testGlobalVariable As Integer testGlobalVariable = 100 Session("thisIsAGlobalVariable") = testGlobalVariable ... in another page... Dim ReadGlobalVariable as Integer ReadGlobalVariable = Session("thisIsAGlobalVariable") Hope this helps.
-
HI , please i need to declare some global variables like : public con as sqlconection public DtSet as Dataset but for condition to retrieve them in each page in ma web site , i sought a lot for that stuff & i've posted a lot of questions in some furoms but nobody gave me a convinced answer can you help me please ?
try to be good if you can't be the best
-
HI , please i need to declare some global variables like : public con as sqlconection public DtSet as Dataset but for condition to retrieve them in each page in ma web site , i sought a lot for that stuff & i've posted a lot of questions in some furoms but nobody gave me a convinced answer can you help me please ?
try to be good if you can't be the best
you can use module form to declare global variables example: public con as new sqlclient.sqlconnection public dataset as new dataset The above commands can be accessed by all forms by declaring them and placed in the public class in seperate module form ok
coding makes me interesting in dot net
-
you can use module form to declare global variables example: public con as new sqlclient.sqlconnection public dataset as new dataset The above commands can be accessed by all forms by declaring them and placed in the public class in seperate module form ok
coding makes me interesting in dot net
Hello, I'm making a project in asp.net with vb,i have a page named as IndividualProperty.aspx. I'm showing the listing of all the property one after it in the page.when any user select any property such as he select "abc" property, when he click on this Property the IndividualPropertypage will be called.that is ok. but i want to change the URL from www.xyz.com/IndividualPropertypage.aspx to www.xyz.com/abc.com meanwhile whatever the property he select property name must be replace the page name in the URL. How is it possible,plz tell me thanx