Click here to Skip to main content
15,905,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Frnds, am working on asp.net, c#,Sqlserver 2005 - WEB APPLICATION.

I have three Textboxes on my webform and a Divide button.

so, how to divide the Textbox1 value to textbox2 and display in textbox3 when divide button clicks.

Please help me.

THANKS.
Posted

buttonclick event
{
try
{
txt3.text = int.parse(txt1.text)/int.parse(txt2.text);
}
catch(exception ex)
{
Response.write(ex.Message);
}
is this your problem?
 
Share this answer
 
Comments
Ranjith Reddy CSE 14-Jul-12 3:44am    
Thank you Boss.
Hi,
Try this:
C#
int res=0;
try{
res=Convert.ToInt32(TextBox1.Text)/Convert.ToInt32(TextBox2.Text);
TextBox3.Text=res.ToString();
}
catch(Exception ex){}


--Amit
 
Share this answer
 
v5
Comments
Ranjith Reddy CSE 14-Jul-12 3:44am    
thanks Boss.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900