我编写了一个显示onbuttonclick对话框的应用程序. 此对话框包含文本框&按钮. 现在,我想通过单击按钮的文本框将值重定向到另一页. 对于重定向,我编写了以下代码
I write one application in which onbuttonclick dialog box is displayed. This dialog box contains text box & button. Now I want to redirect to another page with value from text box on button click. For the redirect I write following code
protected void btnDisplay_Click(object sender, EventArgs e) { string strName; string strCountry; strName=txtName.Text; strCountry = ddlName.Text; Response.Redirect("Next.aspx?name=" + strName + "&country=" + strCountry); }但是,当我单击按钮时,我无法进入下一页. 我该怎么办? 谢谢.
But when I click on the button I cannot go to next page. What am I to do? Thanks.
推荐答案我想您想关闭对话框并重定向父页面,对吗?您可以为此调用一些javascript. 像这样的东西: I guess you want to close the dialog and redirect the parent page, right? You could invoke some javascript for that. Something like: Response.Write("<script>parent.location.href = ''someurl.here'';")
另外,在这里看看: www.webdeveloper/forum/archive/index.php/t- 15245.html [^ ] weblogs.asp/ksamaschke/archive/2003/02/23/2831.aspx [ ^ ] 祝你好运!
Also, have a look here: www.webdeveloper/forum/archive/index.php/t-15245.html[^] weblogs.asp/ksamaschke/archive/2003/02/23/2831.aspx[^] Good luck!
更多推荐
如何使用asp.net在对话框中单击按钮时从一页重定向到另一页
发布评论