Request.Querystring or something else?

D

David

in classic ASP I divided each .asp file into several parts being run by
switch (Request.Querystring("action").Item)
...


what is the best way to do this by .Net? Anchor control events?
 
J

Josh

David said:
in classic ASP I divided each .asp file into several parts being run by
switch (Request.Querystring("action").Item)


I dont understand what your getting at. There are UserControls which can be
used to differn't parts of a page. Can you clarify?
 
S

Scott M.

ASP .NET is all about event handling and the self-calling page paradigm. If
you use a server link button control, you can simply write a server side
event handler for it.
 
D

David

hmm let me clarify; in classic asp I had a file called articles.asp

based on the querystring I would read single item
articles.asp?action=readitem&ID=xxx

or view all categories
articles.asp?action=allcats

etc...

instead of having multiple .asp files I combined several "events" into one
and made a Switch based on the Querystring
 
S

Scott M.

Yes, but how did that original querystring get decided? A checkbox
somewhere? We need to know this to help you answer your question.
 
D

David

ahh.. well it came from a <a href="...

but then I've figured it out, I'll be using an event controller for the
anchor tag - just took some time for me to actually believe it after 5 years
of classic asp linear coding :)
 
S

Scott M.

Kinda sounds like what I said in my first reply:

ASP .NET is all about event handling and the self-calling page paradigm. If
you use a server link button control, you can simply write a server side
event handler for it.
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top