Monthly Archives: September 2013

Advanced Ado.net

Example of basic way of calling stored procedure private void button1_Click(object sender, EventArgs e) { using (SqlConnection con = new SqlConnection(dc.Con)) { using (SqlCommand cmd = new SqlCommand(“sp_Add_contact”, con)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(“@FirstName”, SqlDbType.VarChar).Value = txtFirstName.Text; cmd.Parameters.Add(“@LastName”, SqlDbType.VarChar).Value = … Continue reading

Posted in Uncategorized | Leave a comment

How to work with Grid view

Creating Customized Grid View <asp:GridView ID=”GV” OnRowDataBound=”Gv_RowDataBound” Width=”96%” runat=”server” AutoGenerateColumns=”False” ShowFooter=”True” BorderWidth=”1px” OnRowEditing=”gv_RowEditing” OnRowDataBound=”gv_RowDataBound” OnRowUpdating=”gv_RowUpdating” OnRowDeleting=”gv_RowDeleting” OnRowCancelingEdit=”gv_RowCancelingEdit” OnRowCommand=”OnRowCommandBTC” TabIndex=”3″ RowStyle-HorizontalAlign=”Center”> </asp:GridView>   DataTable BTC = ViewBTCData().Tables[0]; // data from some data table source gvBenefitType.DataSource = null; gvBenefitType.DataSource = BTC; gvBenefitType.DataBind(); … Continue reading

Posted in Uncategorized | Leave a comment

Some Times My DotNet Code works fine in Local but not when deployed

HI friends , i came through the scenario where my code was working as expected in local when i run it through local host but it was not working as expected when i deployed the code into IIS server. Generally … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment