hello,
is it possble to assign hyperlink navigation query string value form textbox thrugh javascript
here is c# code need in javascript
please advice
hlURL.NavigateUrl = "Default.aspx?ID=" + txtValue.Text;
Hi nauna,
Please refer below sample.
HTML
<script type="text/javascript"> function SetUrl() { var id = document.getElementById('<%= txtId.ClientID %>'); var hyperlink = document.getElementById('<%= hlURL.ClientID %>'); hyperlink.href = "Default.aspx?ID=" + id.value; } </script> ID: <asp:TextBox runat="server" ID="txtId" /> <asp:Button ID="Button1" Text="Assign" runat="server" OnClientClick="SetUrl();return false;" /> <asp:HyperLink ID="hlURL" runat="server" Text="View" />
Screenshot
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.