First of all, if you have a table called states, you probably have there a
record for every state. Then why do you need a loop to create textboxes? You
can use a datagrid or datalist or repeater and databind it to the table.
Even if you for whatever reason want textboxes, you can make a templated
column.
Now, there is a server control called HyperLink You can either use it
instead of the textbox or next to the textbox. You will have to setup in
runtime its property NavigateUrl. If you are using a loop, do it in the
loop. If you switch to a datagrid/datalist/repeater, use either databinding
expression or ItemDataBound event. That is the direction. The details you
can work out yourself.
Eliyahu
"Big E" <no****@nospam. com> wrote in message
news:Ov******** *****@tk2msftng p13.phx.gbl...
I'm using ASP.Net and SQL Server. I have a table called states. I have 2
forms.
On form 1 is the 50 states in textboxes created with a loop.
I want to have those 50 or 45 or whatever amount of states have a
hyperlink. Once you click the hyperlink it will take the stateId from the click event
and use the Get method to send it to the next page.
Page 2 will simply use the browswer get method to show information based
on that stateid.
So my question is how to create a text hyperlink using a loop that onclick
of hyperlink it opens up the next page like: http://www.etc.com?stateid.
How do I create that hyperlink?
Thanks.