I went through and spent all my time on almost all links and sources about these topics: BUSINESS LAYER, PRESENTATION LAYER, DATA ACCESS LAYER. But still i don't understand it because different sources, different usage, it confuses me a lot. Now this is my final try to understand it. Help me. I am writing piece of code so Please categorize it in respective layers and provide little bit explanation if possible. Thanks.
.aspx
<asp:textbox id="txtName" runat="server"/>
<asp:textbox id="txtPwd" runat="server"/>
<asp:button id="txtButton" runat="server" />
.cs
String selectQuery= "Select * from tblUser where id="'+txtName.Text+"'";
String ConStr = "string to connect database":
SqlConnection sqlCon = new sqlconnection(ConStr);
SqlCommand sqlCom = new sqlCommand(selectQuery, sqlCon);
SqlDataAdapter sqlDA = new SqlDataAdapter(sqlCom);
DataSet ds = new DataSet();
sqlDA.Fill(ds);
try
{}
catch(....)
{}
Please help.