Link to home
Start Free TrialLog in
Avatar of gsmithaaa
gsmithaaa

asked on

Extract value of <asp:TextBox> using Databinder

Within an .aspx form there is a table.
Inside the table is a <td> which contains an <a href>
The URL for the <a href> is part static and part dynamic.
The beginning of the URL is <a href="LinkDetail.aspx?LC=" and then I need to extract
the value of an <asp:TextBox> to complete the URL.

My question is, from within the .aspx form, how can I extract the value of the
<asp:TextBox> and add it to the <a href> using Databinder?

The value of the textbox is not known until the user types a value in, after the page load.

<tr>
   <td class="Content" align="center" width="20%">Link Category #3</td>
   <td class="Content" align="center" width="25%"><asp:TextBox ID="LinkCat3" Width="300" Runat="server"></asp:TextBox></td>
   <td class="Content" align="center" width="25%"><asp:TextBox id="LinkCatDescr3" Width="300" runat="server"></asp:TextBox></td>
   <td class="Content" align="center" width="25%"><asp:TextBox id="LinkCatSrt3" Width="25" runat="server"></asp:TextBox></td>
   <td class="Content" align="center" width="5%"><a href="ELinksDetail.aspx?LID=3&CName=" + <%# DataBinder.Eval("LinkCat3") %>>Detail</a></td>
</tr>

The above is a snippet of html from the .aspx page.  What I want to do is complete the <a href> based upon the value of <asp:TextBox id="LinkCat3">
ASKER CERTIFIED SOLUTION
Avatar of lengreen
lengreen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial