Request.Querystring or something else?

  • Thread starter Thread starter David
  • Start date Start date
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?
 
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?
 
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.
 
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
 
Yes, but how did that original querystring get decided? A checkbox
somewhere? We need to know this to help you answer your question.
 
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 :)
 
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.
 
Back
Top