如何在用户填写注册表单时创建自动用户ID [英] how to create automatic user id when a user fills up a registraton form

查看:172
本文介绍了如何在用户填写注册表单时创建自动用户ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个页面,如果用户完成填写表单,而不是单击提交按钮,则应该自动创建一个页面。并将其显示给用户。

i want to create a page in which if a user completes filling up a form than when he clicks submit button than an is should be created auto. and display it to user.

推荐答案

这不是一个真正的ASP.Net问题。您需要做的是在users表中创建一个自动增量字段,每次添加新用户时都会为您提供增加的ID。



了解有关自动增量的更多信息现场:



http://www.w3schools.com /sql/sql_autoincrement.asp [ ^ ]
It's not really a ASP.Net question. What you need to do is create a auto increment field in your users table which gives you the incremented id every time a new user is added.

Read more about Auto Increment Field here:

http://www.w3schools.com/sql/sql_autoincrement.asp[^]


我认为您的问题是在插入后获取最后插入的标识值。参考:

@@ IDENTITY(Transact-SQL) [< a href =http://technet.microsoft.com/en-us/library/ms187342.aspxtarget =_ blanktitle =新窗口> ^ ]
I think your issue is about getting the last-inserted identity value after an insertion. Refer:
@@IDENTITY (Transact-SQL)[^]


这篇关于如何在用户填写注册表单时创建自动用户ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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