|
-
Aug 16th, 2005, 02:09 PM
#1
Thread Starter
Member
HELP!! new to asp.net!
Hi, I am making an ASP.NET web form for the first time, and I have a few questions:
1) How do you make global array variables?
I know that you can make global variables such as:
Application("end")=end
in your Global.asax's Application_Start (..) and access it in ur Page_Load:
Application("end")=false
but for arrays, how do you declare it and call it?
2) How do you allow for the user to move an object on the page? (ex: if the user is allowed to move an icon around the page to wherever they would like)? Also, how would you restrict the user to only move horizontally (or vertically)?
Thank you SO much in advance for any help.
-
Aug 17th, 2005, 10:51 AM
#2
PowerPoster
Re: HELP!! new to asp.net!
1. Use Application variables very carefully, Once you set an application variables, its stays in the memory till the time you restart the server/iis. Its not exactly the same as a global variable which you probably have used in VB6. Perphaps you would need to read about maintaining sessions.
2. thats DHTML/javascript, get a good book or read on online tutorials. the folloowing sites have lots and lots of ready cut-paste codes:
www.hotscripts.com
www.javascript.com
www.dynamicdrive.com
-
Aug 17th, 2005, 12:35 PM
#3
Thread Starter
Member
-
Aug 19th, 2005, 10:46 AM
#4
PowerPoster
Re: HELP!! new to asp.net!
I was wondering: is there any other way (other than the Application("..") method) to make "global" variables (like vb6)?
Depends on what you are trying to achieve. If you tells us exactly what you have in mind, someone just would have a good idea how to deal with it.
Remember that ASP.NET application runs on the server where its hosted and the VB6 applications runs on the client machine!
-
Aug 19th, 2005, 12:36 PM
#5
Thread Starter
Member
Re: HELP!! new to asp.net!
hey john
i tried putting the code that I had before (Application("lbl")=lbl etc) in the Session_Start Function instead of the Application_Start Function, and it seems to work a lil better. I just want the variables to be accessed anytime the page is open, and to save components and values in arrays/integer variables. If i dont have "global" variables, everytime the page loads up, (anytime there's any change to teh page), all the values become their default which I dont want
thanks for all of your help again
-
Sep 2nd, 2005, 08:06 AM
#6
Thread Starter
Member
Re: HELP!! new to asp.net!
hey,
I was wondering if anyone would know any good sites on using excel files/formats on asp.net?
thanks
Last edited by nima1985; Sep 2nd, 2005 at 08:29 AM.
-
Sep 4th, 2005, 01:26 AM
#7
Lively Member
Re: HELP!! new to asp.net!
You can use Session variable as
Session["name"]
-
Sep 6th, 2005, 09:51 AM
#8
Thread Starter
Member
Re: HELP!! new to asp.net!
 Originally Posted by phrajib
You can use Session variable as
Session["name"]
hey phrajib, thanks for the advice. i changed all my "Application" variables to Session variables, and it works perfectly. thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|