I am Inserting Data Into Database And Then Giving Message On Label as
Lead Saved Successfully
and then It Bind all Data to GridView Which We have Inserted Now And Earlier inserted
for that I have Function
AllMyLeads();
I have Given Message After InsertQuery Execuated Data is Inserting But Message is not Showing
I have also try to Display Message After ShowFunction i.e
AllMyLeads()
but It Showing Message
Re: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server cou...
In developer tool
What I have tried:
SqlConnection connection10 = new SqlConnection(connstring);
connection10.Open();
if (Addcompanyname1.Text != "")
{
string str101 = "exec strp_insertintoAdd_Lead @Companyid=" + companyid1 + ",@Contactperson='" + txtContactPerson1.Text + "',@Telephone='" + str11 + "',@Emailid='" + txtEmailID1.Text + "',@Bankid=" + Bankid1 + ",@BankerContactperson='" + Convert.ToString(txtBankerContactPerson1.Text) + "',@Turnover='" + txtTurnover1.Text + "',@EmailBankperson='" + txtEmailidBankerContactPerson1.Text + "',@SourceLead='" + sourceid + "',@AddressLine1='" + txtAddressLine11.Text + "',@AddressLine2='" + txtAddressLine21.Text + "',@Pincodeid=" + ViewState["pincodeid1"].ToString() + ",@Cityid=" + ViewState["cityid1"].ToString() + ",@Productid=" + pid1 + ",@Ratedby=" + Rbid1 + ",@Createdby=" + ViewState["Userid"].ToString() + ",@Lastupdatedby=" + ViewState["Userid"].ToString() + ",@Datecreatedby='" + date + "',@Lastupdatedon='" + date + "',@Userid=" + ViewState["Userid"].ToString() + ",@LeadOwner=" + ViewState["Userid"].ToString() + ",@bankfacility='" + Convert.ToString(txtbankfacility.Text) + "',@MobileNo='" + Convert.ToString(txtMobileNo.Text) + "',@BankersMobileNumber='" + Convert.ToString(BankerMobileNo.Text) + "',@BankersTelNumber='" + str12 + "'";
new SqlCommand(str101, connection10).ExecuteNonQuery();
lblMessage.Visible = true;
lblMessage.Text = "Lead saved successfully";
bLbVis = true;
connection10.Close();
and Also Tryed Following
in Insert Function I have made
bLbVis == true
and then for Show Function I have Given Message
public void AllMyLeads()
{
emptygrid.Visible = false;
dset = getDataDataset("exec strp_downloadallmyleads @leadowner='" + ViewState["Userid"].ToString() + "'");
if (dset.Tables[0].Rows.Count == 0)
{
emptygrid.Visible = true;
}
else
{
girdAllMyleads.DataSource = dset.Tables[0];
girdAllMyleads.DataBind();
}
if (bLbVis == true)
{
lblMessage.Visible = true;
lblMessage.Text = "Lead saved successfully";
return;
}
}