for example
diesel consumed textbox combox1 combox2
20 15
out put as 3000
how to do?
using asp.net with csharp.
Regards,
Rao.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Oct 10, 2012, 2:13 AM EDT
textbox1.Text= int32.Parse(cmb1.SelectedValue.ToString())*int32.Parse(cmb2.SelectedValue.ToString())
Satyapriya NayakRank #47 · 31.5K reputationPosted Oct 10, 2012, 2:53 AM EDT
Please tell me this is a windows apps or web apps,you should be clear about that.In the above post you have mentioned about combobox and using asp.net with csharp.What is this?
Second thing
By multiply 20*15=300
Please ask your questions clearly so that you will get correct answer.
using asp.net with csharp
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication4._Default" %>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace WebApplication4
{
public partial class _Default : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
double d1 = Convert.ToDouble(DropDownList1.SelectedItem.Text.ToString());
double d2 = Convert.ToDouble(DropDownList2.SelectedItem.Text.ToString());
TextBox1.Text = (d1 * d2).ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.Items.Add("20");
DropDownList2.Items.Add("15");
}
}
}
}
Thanks