Click here to Skip to main content
15,908,901 members
Home / Discussions / C#
   

C#

 
AnswerRe: Executing a "string" block of code Pin
Gerry Schmitz5-Nov-09 14:22
mveGerry Schmitz5-Nov-09 14:22 
GeneralRe: Executing a "string" block of code Pin
Gerry Schmitz5-Nov-09 14:25
mveGerry Schmitz5-Nov-09 14:25 
QuestionRegarding SqlServer smo and C# Pin
Håkan Axheim5-Nov-09 11:42
Håkan Axheim5-Nov-09 11:42 
AnswerRe: Regarding SqlServer smo and C# Pin
Christian Graus5-Nov-09 11:57
protectorChristian Graus5-Nov-09 11:57 
GeneralRe: Regarding SqlServer smo and C# Pin
Håkan Axheim5-Nov-09 12:00
Håkan Axheim5-Nov-09 12:00 
Questionignore button events on window mobile Pin
Justin Talley5-Nov-09 11:27
Justin Talley5-Nov-09 11:27 
AnswerRe: ignore button events on window mobile Pin
Christian Graus5-Nov-09 11:57
protectorChristian Graus5-Nov-09 11:57 
Questionarray help please Pin
BDJones5-Nov-09 10:46
BDJones5-Nov-09 10:46 
QuestionRe: array help please Pin
harold aptroot5-Nov-09 10:56
harold aptroot5-Nov-09 10:56 
AnswerRe: array help please Pin
BDJones5-Nov-09 11:03
BDJones5-Nov-09 11:03 
GeneralRe: array help please Pin
harold aptroot5-Nov-09 11:29
harold aptroot5-Nov-09 11:29 
GeneralRe: array help please Pin
BDJones5-Nov-09 11:44
BDJones5-Nov-09 11:44 
GeneralRe: array help please Pin
harold aptroot5-Nov-09 11:50
harold aptroot5-Nov-09 11:50 
GeneralRe: array help please Pin
BDJones5-Nov-09 12:02
BDJones5-Nov-09 12:02 
GeneralRe: array help please Pin
harold aptroot5-Nov-09 12:03
harold aptroot5-Nov-09 12:03 
AnswerRe: array help please Pin
Christian Graus5-Nov-09 11:00
protectorChristian Graus5-Nov-09 11:00 
GeneralRe: array help please Pin
BDJones5-Nov-09 11:12
BDJones5-Nov-09 11:12 
GeneralRe: array help please Pin
Christian Graus5-Nov-09 11:55
protectorChristian Graus5-Nov-09 11:55 
Questiondatalist with an embedded dropdownlist. Pin
Crapaw455-Nov-09 10:31
Crapaw455-Nov-09 10:31 
I have a datalist with an embedded dropdownlist. How can I fire an event from the dropdownlist and caclulate the results for a label in the datalist?

The datalist is similar to a shopping cart. The fore mentioned dropdownlist is the qty for each item. The total price is calculted using the qty and another field "PriceEach".

Most of the data is retrieved from a sql stored produre.

I wrote the following Item_Bound function to set the totalprice at the page_load.

protected void Item_Bound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DropDownList ddlist = (DropDownList)e.Item.FindControl("ddlQty");
Label TotPrice = (Label)e.Item.FindControl("lblTotalPrice");
Label PriceEA = (Label)e.Item.FindControl("lblPrice");
if (PriceEA.Text != null && PriceEA.Text.ToString() != "")
{
string price = PriceEA.Text.Replace("$", "");
Double dblPrice = Convert.ToDouble(price);
Double ProdQty = Convert.ToDouble(ddlist.SelectedValue.ToString());
Double ExtPrice = (dblPrice * ProdQty);
TotPrice.Text = ExtPrice.ToString();
}

}
}



Unsure | :~
AnswerRe: datalist with an embedded dropdownlist. Pin
Abhishek Sur5-Nov-09 10:42
professionalAbhishek Sur5-Nov-09 10:42 
GeneralRe: datalist with an embedded dropdownlist. Pin
Crapaw455-Nov-09 10:47
Crapaw455-Nov-09 10:47 
GeneralRe: datalist with an embedded dropdownlist. Pin
Abhishek Sur5-Nov-09 22:07
professionalAbhishek Sur5-Nov-09 22:07 
GeneralRe: datalist with an embedded dropdownlist. [solved] Pin
Crapaw456-Nov-09 3:17
Crapaw456-Nov-09 3:17 
GeneralRe: datalist with an embedded dropdownlist. Pin
Abhishek Sur8-Nov-09 4:29
professionalAbhishek Sur8-Nov-09 4:29 
QuestionRead TEXT from within 2 xml nodes (tricky I think ...) Pin
sodevrom5-Nov-09 9:58
sodevrom5-Nov-09 9:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.