Inserting Data into database from presentation layer.

Posted by Santoshkumar under ASP.NET on 4/1/2011 | Points: 10 | Views : 2116 | Status : [Member] | Replies : 2
I have 100 controls in asp.net page. I want to insert data into database. what should i do. for example in a single page i have 100 textboxes i entered text in these textboxes . I am using N-Tier architecture.
plz help me.

thanq.




Responses

Posted by: SheoNarayan on: 4/1/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
In case of N-tier architecture passing 100 parameters to the BAL / DAL doesn't looks feasible, so in this case you can create a Entity object (A class with 100 property) and set those properties values into the Presentation layer, pass that object through the BAL and DAL and in the DAL, access that objects property and pass parameters to the SQL Command object.

Read this article http://www.dotnetfunda.com/articles/article18.aspx where I have a BO layer that contains the object.

Hope this helps.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Santoshkumar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 4/3/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

The best performance option u need to use is loop through all the control and prepare an XML and pass the XML to database and use it to insert it to the database...

Thanks
Karthik
www.f5Debug.net

Santoshkumar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response