我怎么能通过身份证? [英] How can i pass the ID?

查看:95
本文介绍了我怎么能通过身份证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用数据库中的ID连接2个页面,id设置为自动递增...



我想传递的值id通过URL和查询字符串。



任何人都可以帮我这个!

I wanted to connect 2 pages using the ID from the database, the id is set to increment automatically...

I wanted to pass the value of the id through the URL and query string.

Can anybody help me with this please !

推荐答案

Something像这样: -



MyPage.aspx?id = xxx&name = yyy
Something like this:-

MyPage.aspx?id=xxx&name=yyy


试试这个:

在查询字符串中传递值:

Try this:
To pass value in query string:
Response.Redirect("Item.aspx?Id=1");



从查询字符串中获取值:

对于字符串:


To get value from query string:
For string:

String Id = Request.QueryString["Id"].ToString();



对于int:


For int:

int id= Convert.ToInt32(Request.QueryString["Id"]);



此外,请看下面的主题:

在两者之间传递变量使用QueryString的页面 [ ^ ]


这篇关于我怎么能通过身份证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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