I am trying to develop a class in asp.net where I want to put some common functions but I don't know how to add value in sql query using ....Parameter.AddWithValue("@r", txt.Text) please suggest me some example or some tutorial please help....
Didn't understood your question clearly. But as far I got it I think you want to add values in to an SQL Insert Query. You can do it by Parameters.Add("Value"). The first statement will add value to the first field and so on..
For more better reference refer MSDN.
I am actually trying to develop a function through which I can able to add the value in sql query.....but I am not able to figure out the way to implement that....
the only thing I know is that I have to use SqlParameterCollection object...
Ya got it. Take a look here *msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlparametercollection.addwithvalue.aspx