Jquery与asp.net ajax UpdatePanel使用问题

wangwuyou 2009-12-18 08:17:12
使用JQuery1.3.2的和它的UI库,弹出一个模式的窗口,简单代码如下:
<link href="../Css/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" id="child" />
<script src="../Script/jquery-1[1].3.2-vsdoc.js" type="text/javascript"> </script>
<script src="../Script/jquery-ui.js" type="text/javascript"> </script>

<script type="text/javascript" language="javascript">

$(function() {

$("#aa").dialog({
height: '500',
width: '710',
modal: true,
autoOpen: false,
overlay: {
backgroundColor: '#000',
opacity: 0.5
}
});
});
</script>


<asp:ScriptManager ID="ScriptManager1" runat="server"
EnableScriptGlobalization="True">
</asp:ScriptManager>

<a href="#" onclick="$('#aa').dialog('open');">open </a>

<div id="aa" title="asdf">
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate>
<asp:TextBox ID="TextBox1" runat="server"> </asp:TextBox>
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButon1_Click" ">LinkButton </asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</div>

protected void LinkButon1_Click(object sender, EventArgs e)
{
string text = TextBox1.Text;

}
问题是在点击LinkButton后,text的值始终为空,也就是说TextBox1控件没有把值传过去,如何解决呀?
...全文
84 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
to_tom 2009-12-18
  • 打赏
  • 举报
回复
你仔细看一下你的代码。jqueryUI仅仅是对标签的样式进行操作,仔细看看你的代码有没有问题,按照你上面给的代码,的话应该会报错的
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButon1_Click" ">
仔细看看这句

52,787

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧