ASP -> ASP.Net, using hyperlink actions

  • Thread starter Davíð Þórisson
  • Start date
D

Davíð Þórisson

sorry my lazyiness (for not Googling!), I'm looking for the .Net way to do
this classical asp setup (Jscript)...

<a href="page.asp?action=do1">bla bla1</a>
<a href="page.asp?action=do2">bla bla2</a>
...


-------- and correspondingly:

switch (Request.QueryString("action"))
{
case "do1"
...
break

case "do2"
...
break
}



I suspect I should be using LinkButton server control... is that correct?
 
D

Davíð Þórisson

1) requires JavaScript on client side
2) must be inside a form element!!!
 
D

Davíð Þórisson

sorry for not putting this whole lot in the first post but...

the thing is I don't need the view state, I'm just browsing pages... (aka
GET method, not POST)

Am I maybe misunderstanding something?
 
B

bruce barker

no. the linkbutton uses javascript to do the postback. I'd stick with the
classic approach.

-- bruce (sqlwork.com)
 
E

Eric Cherng

For this basic functionality, just create your links like you did then
respond in your Page_Load event handler and check the Request.QueryString
collection.
 

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

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top