Results 1 to 8 of 8

Thread: HELP!! new to asp.net!

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    ottawa canada
    Posts
    41

    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.

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    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

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    ottawa canada
    Posts
    41

    Re: HELP!! new to asp.net!

    hey johnny

    thanks so much for the reply


    I was wondering: is there any other way (other than the Application("..") method) to make "global" variables (like vb6)?



    And the links are really good. thanks for that. I actually found something close to what I wanted (a horizontal slider). gt test it in my application tho

    Last edited by nima1985; Aug 18th, 2005 at 01:32 PM.

  4. #4
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    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!

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    ottawa canada
    Posts
    41

    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

  6. #6

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    ottawa canada
    Posts
    41

    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.

  7. #7
    Lively Member
    Join Date
    Mar 2005
    Location
    Dhaka, Bangladesh
    Posts
    102

    Re: HELP!! new to asp.net!

    You can use Session variable as

    Session["name"]

  8. #8

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    ottawa canada
    Posts
    41

    Re: HELP!! new to asp.net!

    Quote 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
  •  



Click Here to Expand Forum to Full Width