Professional Documents
Culture Documents
Tutorials
Forum
Career Development
Articles
Reviews
Jobs
Practice Tests
Projects
Code Converter
Register
Search
In this Article, I am going to Explain about How to create Alphanumeric Auto Increment in ASP.NET from SQL Server. I have Seen too many membe
How to create Alphanumeric Auto Increment in ASP.NET from SQL Server. So I am deciding to write article about How to create Alphanumeric Auto
Increment in ASP.NET from SQL Server.
Today We are going to Learn about How to create Alphanumeric Auto Increment in ASP.NET with C# 2005 from SQL Server. Learn How to create Alphanumeric Auto Increment in ASP.
SQL Server
http://www.dotnetspider.com/resources/43204-How-create-Alphanumeric-Auto-Increment.aspx
1/4
3/30/2014
Write below code in Button Click event For Insert in SQL Server
public void InsertStaffDetails(string EmpNumber, string EmpName, DateTime DOB, string Department, string Designation, string MobileNo, string EmailId, string Addres
{
SqlConnection con = new SqlConnection(ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "SpInsertStaffDetails";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@StaffNumber", SqlDbType.VarChar, 50).Value = StaffNumber;
cmd.Parameters.Add("@StaffName", SqlDbType.VarChar, 50).Value = StaffName;
cmd.Parameters.Add("@DOB", SqlDbType.DateTime, 50).Value = DOB;
cmd.Parameters.Add("@Department", SqlDbType.VarChar, 50).Value = Department;
cmd.Parameters.Add("@Designation", SqlDbType.VarChar, 50).Value = Designation;
cmd.Parameters.Add("@MobileNo", SqlDbType.VarChar, 50).Value = MobileNo;
cmd.Parameters.Add("@EmailId", SqlDbType.VarChar, 50).Value = EmailId;
cmd.Parameters.Add("@Address", SqlDbType.VarChar, 50).Value = Address;
cmd.ExecuteNonQuery();
con.Close();
}
http://www.dotnetspider.com/resources/43204-How-create-Alphanumeric-Auto-Increment.aspx
2/4
3/30/2014
@Address varchar(100)
)
AS
BEGIN
INSERT INTO StaffDetails(StaffNumber,StaffName,DOB,Department,Designation,MobileNo,EmailId,Address) VALUES
(@StaffNumber,@StaffName,@DOB,@Department,@Designation,@MobileNo,@EmailId,@Address)
End
GO
I think It will help you about How to create Alphanumeric Auto Increment in ASP.NET from SQL Server . Thanks for reading my Article How to create Alphanumeric Auto Increment in AS
SQL Server. if you have any query or you have any suggestion, let me know. I will appreciate you valuable feedback.
if you want to know about How to Create Login Page in ASP.Net Applications using Session. Please Refer Following Link.
How to Create Login Page in ASP.Net Applications using Session.
if you want to know about How to Upload Excel file in ASP.Net Applications. Please Refer Following Link.
Excel file upload in asp.net 2.0 display in grid view
Thanks
S.Suresh
Did you like this resource? Share it with your friends and show your love!
1
Tw eet
Share
Responses to "How to create Alphanumeric Auto Increment in ASP.NET from SQL Server"
Guest Author: karthika
15 Aug 2012
Hi,
This Alphanumeric Auto Increment value is working.I want the auto value should be shown after clicking the submit button.This code is showing the auto value before clicking the butt
help me to avoid it.
Thank you
16 Apr 2013
Feedbacks
Subscribe to Feedbacks
Un Subscribe
Post Comment:
Submit Response
http://www.dotnetspider.com/resources/43204-How-create-Alphanumeric-Auto-Increment.aspx
3/4
3/30/2014
Submit Article
About Us
Contact Us
Copyright
Privacy Policy
Terms Of Use
Advertise
http://www.dotnetspider.com/resources/43204-How-create-Alphanumeric-Auto-Increment.aspx
4/4