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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Oct 10, 2012, 6:53 AM
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
Santhosh Kumar JayaramanPosted Oct 10, 2012, 6:13 AM
textbox1.Text= int32.Parse(cmb1.SelectedValue.ToString())*int32.Parse(cmb2.SelectedValue.ToString())