string str = Convert.ToInt32(comboBox2.SelectedItem.Text); float f = Convert.ToDecimal (textBox1.Text);
Mark as Answer if its helpful to you Kumaraspcode2009@gmail.com
<asp:DropDownList ID="drop1" runat="server"> <asp:ListItem Text="1" Value="1" /> <asp:ListItem Text="2" Value="2" /> <asp:ListItem Text="3" Value="3" /> </asp:DropDownList> <asp:TextBox ID="txtText" runat="server" ></asp:TextBox> <asp:Label ID="lblMessagE" runat="server"></asp:Label> <asp:Button ID="btnSub" runat="server" Text="Submit" OnClick="SubmitMe" />
protected void SubmitMe(object sender, EventArgs e) { int i = int.Parse(drop1.SelectedValue); int j = int.Parse(txtText.Text); int k = i * j; lblMessagE.Text = k.ToString(); }
Regards, Sheo Narayan http://www.dotnetfunda.com
Login to post response