Dipa Ahuja

Dipa Ahuja

  • NA
  • 3.3k
  • 706.6k

Asp.net Label is an ambiguous reference

Sep 25 2009 11:54 AM
hello i have one formview control n i want to retrive values from that n add save them in local variables pcode:

pname:

 


price: Rs. Return to the main shop this is .cs file code for iamgebutton's click event: protected void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e) { string pname = ((Label)FormView1.FindControl("pnameLabel")).Text; string price = ((Label)FormView1.FindControl("priceLabel")).Text; double price = double.Parse(p.ToString()); } i get error while retriving values of labels : Error1'Label' is an ambiguous reference between 'System.Web.UI.WebControls.Label' and 'System.Windows.Forms.Label' n for double.Parse: like : "Input string was not in a correct format"

Answers (3)