Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie stored procedure parameter question

Status
Not open for further replies.

belocin

Programmer
Jul 10, 2000
12
US
I'm very new to .net and I kinda jumped in after reading a few chapters in the dummies books. I have a question about where I put and what code I use to pass the value of a text box into a stored procedure.
Do I put it in the click sub of the button here is what I have right now
Private Sub btnGetCust_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetCust.Click
myComponent.FillDataSet(DsGetTConsumer1)
DataGrid1.DataBind()
End Sub
or do I put it somewhere in the in the component code?
Also what are some good online references for .net. I can never find anything on the msdn site.
Thanks in advance for the help
 
This is an architecture question, and a lot depends on who/what you're targeting your app for (i.e. intranet app, or a new Yahoo-sized site).

But on the whole, I try to keep the SQL out of the presentation layer. I'd create a class library to hold all your data access code, and pass the results to the presentation layer in either custom objects, or XML.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top