sir i am genrating autonumer using code
random rn=new random, cmd.Parameters.Add(new SqlParameter("@fecultyregno",rn.Next(9999)));
i want insert value in database in this form
faculty/random number how i can do
and my sql query:::
Insert Into addfaculty(fecultyregno,post,title,firstname,middlename,lastname,dob,gender,houseno,street,correspondanceadd,pgdegree,pguniversity,pgstartingyear,pgendyear,pgspecilization,pgmarks,pgdivision,ugdegree,uguniversity,ugstartingyear,ugfinishyear,ugspecil,ugmarks,ugdiv,otherdegree,otheruniversity,otherstartingyear,otherfinishyear,otherspecil,othermarks,otherdiv,highunivert,highfinishyer,highspecilzation,highmarks,highdiv,interunivert,interfinishyear,interspecilization,intermarks,interdiv,firstinstitution,firstdesignation,firstfrom,firstto,firstjobrole,secondinstitution,seconddesignation,secondfrom,secodto,secodjobrole,nationality,city,imagepath,imgname,facdate)
values
(@fecultyregno,@post,@title,@firstname,@middlename,@lastname,@dob,@gender,@houseno,@street,@correspondanceadd,@pgdegree,@pguniversity,@pgstartingyear,@pgendyear,@pgspecilization,@pgmarks,@pgdivision,@ugdegree,@uguniversity,@ugstartingyear,@ugfinishyear,@ugspecil,@ugmarks,@ugdiv,@otherdegree,@otheruniversity,@otherstartingyear,@otherfinishyear,@otherspecil,@othermarks,@otherdiv,@highunivert,@highfinishyer,@highspecilzation,@highmarks,@highdiv,@interunivert,@interfinishyear,@interspecilization,@intermarks,@interdiv,@firstinstitution,@firstdesignation,@firstfrom,@firstto,@firstjobrole,@secondinstitution,@seconddesignation,@secondfrom,@secodto,@secodjobrole,@nationality,@city,@imagepath,@imgname,GETDATE())