Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to Generate Based on Location AutoGenerate Number using
Venkata Subbareddy
May 27 2015 9:36 AM
401
Reply
Hi Every one,
Today Iam develop one module here i faced Some Many Problems Please solve them..
Actully when user select The Location in dropdownlist based Location First 3 letters + auto increment Id Will Be Display On TextBox ..... Please Give Suggesttions in the Below iam writeing Logic Let me know Any modifications....
protected void dpCity_SelectedIndexChanged(object sender, EventArgs e)
{
AutoNumber();
}
public void AutoNumber()
{
SqlConnection con = new SqlConnection("Data Source=SERVER;Initial Catalog=MuraliIIT;User ID=sa;Password=rits@1234");
con.Open();
string s = "select count(*) from Test";
SqlCommand com = new SqlCommand(s, con);
int count = Convert.ToInt16(com.ExecuteScalar()) + 1;
TxtUserid.Text = dpCity.SelectedItem.Text + count;
con.Close();
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How to retrive the DropDownListValue to TextBox using asp.n
How to generate the Autounique id