Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: Read TEXT from within 2 xml nodes (tricky I think ...) Pin
Christian Graus5-Nov-09 10:32
protectorChristian Graus5-Nov-09 10:32 
Questionbase class connection string Pin
Stryder_15-Nov-09 9:25
Stryder_15-Nov-09 9:25 
AnswerRe: base class connection string Pin
PIEBALDconsult5-Nov-09 9:40
mvePIEBALDconsult5-Nov-09 9:40 
GeneralRe: base class connection string Pin
Stryder_15-Nov-09 10:20
Stryder_15-Nov-09 10:20 
GeneralRe: base class connection string Pin
PIEBALDconsult5-Nov-09 12:10
mvePIEBALDconsult5-Nov-09 12:10 
AnswerRe: base class connection string Pin
Not Active5-Nov-09 10:13
mentorNot Active5-Nov-09 10:13 
Questionicons changind while clicking treeview nodes Pin
Chesnokov Yuriy5-Nov-09 8:30
professionalChesnokov Yuriy5-Nov-09 8:30 
AnswerRe: icons changind while clicking treeview nodes Pin
snorkie5-Nov-09 9:27
professionalsnorkie5-Nov-09 9:27 
QuestionHelp ! Database Problem, Unknown Information in an Access DataBase by the MEMO type! [modified] Pin
maysam gamini5-Nov-09 8:27
maysam gamini5-Nov-09 8:27 
AnswerRe: Help ! Database Problem, Unknown Information in an Access DataBase by the MEMO type! Pin
Wes Aday5-Nov-09 9:07
professionalWes Aday5-Nov-09 9:07 
GeneralRe: Help ! Database Problem, Unknown Information in an Access DataBase by the MEMO type! Pin
maysam gamini5-Nov-09 12:20
maysam gamini5-Nov-09 12:20 

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.