ASP.NET参数传递 [英] ASP.NET parameter passing

查看:85
本文介绍了ASP.NET参数传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个维护学生详细信息的应用程序.
在这种情况下,我有一个Web表单"StudentList.aspx",该表单列出了Gridview中的所有学生ID(ID,名称,地址),还有另一个Web表单,例如"AssignStudent.aspx"
现在我想使用另一个包含(讲师姓名(下拉列表),主题(下拉列表),位置...)的asp.net Web表单将每个学生分配给一名讲师.
我的问题是,如果我单击学生ID 100,那么它应该打开另一个Web表单以将该特定学生分配给一名讲师.

谁能给我一个实现此目标的想法.
如果我的问题不清楚,请让我知道.

谢谢,

Hi,

I have an application for maintaining the student details.
In this I have one web form ''StudentList.aspx'' which list all the student ids in a Gridview(id,name,address) and I have one more web form like ''AssignStudent.aspx''
Now I want to assign each student to a Lecturer using another asp.net web form containing(lecturer name(drop downlist),subject(drop downlist),location....)

My question is If I click on student Id 100 then it should open the another web form to assign that particular student to a lecturer.

Can anyone give me the idea how to achieve this.
Please Let me know if my question is not clear to understand.

Thank you,

推荐答案

单击ID 100时,在后面的代码中使用Response.Redirect(〜/AssignStudent.aspx?Id ="+值)

在AssignStudent.aspx中,使用

Request.QueryString获取数据并处理
When you click on Id 100, in the code behind open the link in another form using Response.Redirect("~/AssignStudent.aspx?Id="+ value)

In the AssignStudent.aspx, use

Request.QueryString to get the data and process


这篇关于ASP.NET参数传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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