Newbie Question

P

peg

I am brand new to asp.net and I was asked to write a web version of a access
application. My question is how do you pass variables to pages thru
asp.net. I'm familiar with classic asp & using request() object from the
passing page. I would think asp.net has a better to manage variables thru
the pages. The application will probably end up being over 12 pages, so i
want to make sure I can keep all the data as they flow the pages without
having to use hidden input fields to keep data stored from page to page.
I've tried to find a sample application out there to look at that might have
3 tiers (data, Business rules, GUI) that uses more than 1 webpage, but i
can't find anything. Everything just posts back to itself which doesn't
help me learn... thanks in advance. If anyone might have some code they
have done to look over that would be wonderful!!

Peg
 
K

Kevin Spencer

Hi Peg,

Welcome to the world of ASP.Net. I know it has "ASP" in the name, but aside
from that, and the HTTP/IIS environment it runs in, it has very little in
common with ASP.

An ASP.Net Page class is a WebForm. A WebForm ALWAYS posts back to itself.
Navigation is done via other methods. The reason? ASP.Net WebForms are
event-driven, with client-side events handled on the server side. Every time
an event on the client occurs that has a server-side event handler, the page
posts back to itself. This causes the Page class to be re-created on the
server, events to be wired up and handled on the server, and the revised
interface (page) being returned to the client.

So, when you want to navigate to another page, you do it via:

1. Hyperlinks in a page.
2. JavaScript in a page.
3. Meta tags in a page.
4. Server.Transfer (transfers control on the server side, without changing
the URL on the client)
5. Response.Redirect (directs the client to navigate to a different page)

ASP.Net is also Object-Oriented, so the whole programming paradigm is
different than ASP. I imagine we'll be seeing a lot of you in the near
future!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
P

peg

Kevin -

Thanks for you reply....

Can I ask how you would handle taking an Access Application to the web (the
backend will now be using SQL2000), I guess I'm having a hard time starting
this project cause I don't know how to dive into it. Do I create the pages
that will be needed for user input, then code the logic into it, or build
the business rules first, then build the GUI? The Access application used a
lot of popup windows to gather different data based on users criteria - for
example if the user chooses to pick 3-tiered plans (its a health insurance
application) then there is a popup asking if they want two 3-tier plans, or
one 3-tier and 2 regular plans, etc.... Would asp.net be able to have
popups like that and post the data back to the page it was initated by? I
just feel so overwhelmed with where to start!
 
K

Kevin Spencer

Hi Peg,

I don't blame you for feeling overwhelmed. .Net is an order of magnitude
larger and more complex than ASP.

ASP.Net can do anything that ASP can do, as well as anything else you can
imagine.

But as to how to get started... well, I wouldn't just jump in and start
coding! You might check out the Microsoft web site http://www.asp.net for
some help. And the freely-downloadable .Net SDK is an invaluable resource:

http://www.microsoft.com/downloads/...A6-3647-4070-9F41-A333C6B9181D&displaylang=en

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top