如何通过锚标记querystring传递文本框服务器控件值 [英] how pass textbox server control value by anchor tag querystring

查看:66
本文介绍了如何通过锚标记querystring传递文本框服务器控件值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<script language ="javascript">

function getPnr()
{
var txtval = document.getElementById('TextBox1').value;
document.getElementById('a1').href = "default.aspx?param1=" + txtval ;
}

</script>




还有锚标签...........






And anchor tag ...........



<a class="menu-root " id="ancher"   önclick='getPnr()' href ="#" rel="lyteframe" rev="width: 500px; height:200px; "

                            style="font-family: arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold;  overflow:hidden; ">
                              GO</a>




但是在aspx页面中,querystring找不到文本框传递的值.
请更正我的代码




But in aspx page querystring not find the value which is passed by textbox.
Please correct my code

推荐答案

嘿,
为什么您在此链接按钮上浪费您的时间,它与锚标记相同?
祝你好运
hey,
why u wasting Your time for this use linkbutton it is same as anchor tag
Best luck


这篇关于如何通过锚标记querystring传递文本框服务器控件值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆