ASP.NET Four Controls
-
I have an ASP.NET form with about 20 textboxes and several dropdown lists. Is there a way to send all of the information to my database handling routines - other than creating 30+ parameters?
Doug Thomas
Hi , yur can use model class for that. create one class which contains all set and get property and then create object of that calss that object will contain all parameter and finally pass this object to the database . please let me know if u required more help i will send u code . :) "It is not enough to have a good mind. The thing is to use it well." Thanks Jitendra
-
Hi , yur can use model class for that. create one class which contains all set and get property and then create object of that calss that object will contain all parameter and finally pass this object to the database . please let me know if u required more help i will send u code . :) "It is not enough to have a good mind. The thing is to use it well." Thanks Jitendra
-
Thanks - code would be helpful. I come from a Visual FoxPro background and some of this is slow going... Thanks again
Doug Thomas
hi, in your model class two property is defined like this private int caseId; private string dbnumber; public int CaseId { get{return caseId;} set{caseId=value;} } public string DBNumber { get{return dbnumber;} set{dbnumber=value;} } this is your two property in model class and u can access this two property by using model class object like this Model.Case objModelCase = new Model.Case(); case is the model class and objModelCase is the object of case class objModelCase.DBNumber=txtDrNumber.Text; objModelCase.CaseId=txtCase.Text; and finally u can paas this objModelCase object to database. i think this will solve your problem. "It is not enough to have a good mind. The thing is to use it well." jitendra