如何通过会话传递值并重定向到另一个页面 [英] how to pass the value through session and redirect to another page
问题描述
批次详细信息屏幕如下;
批次ID文本框1
课程下拉列表1
问题文件Dropdownlist2
批日期日历
然后我按下按钮叫GO
在该按钮中我想使用会话传递Batchid和课程并重定向到教师页面。
运行模式如下;
批次ID textbox1
课程下拉列表1
问题文件下拉列表2
批日期日历
Go(按钮)
点击它将重定向到教师页面的Go按钮。
$(暂停)中的
如何编写代码以重定向到教师页面。
请帮帮我。
我怎样才能使用Csharp。
问候,
Narasiman P 。
Batch Details screen as follows;
Batch id textbox1
Course Dropdownlist1
Question Paper Dropdownlist2
Batch Date Calendar
Then i have Button called GO
in that button i want to pass the Batchid and Course using session and redirect to Instructor Page.
Run Mode as follows;
Batch id textbox1
Course Dropdownlist1
Question Paper Dropdownlist2
Batch Date Calendar
Go (Button)
when i click the Go Button it will redirect to Instructor Page.
for that in the Go (Button) how can i write the code to redirect to the instructor Page.
please help me.
how can i do using Csharp.
Regards,
Narasiman P.
推荐答案
protected void GO_Click(object sender, EventArgs e)
{
Session["Batch"] = textbox1.text;
Session["Course"] = Dropdownlist1.text;
Session["Question"] = Dropdownlist2.text;
Session["Date"] = textbox2.text;
Response.Redirect("/whatever");
}
这篇关于如何通过会话传递值并重定向到另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!