Click here to Skip to main content
15,927,055 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: By entereing a string load a particular URL in browser Pin
Guffa22-Dec-05 7:33
Guffa22-Dec-05 7:33 
AnswerRe: By entereing a string load a particular URL in browser Pin
jcrussell22-Dec-05 15:14
jcrussell22-Dec-05 15:14 
Questiongenerating asp:textbox in loop Pin
g00fyman21-Dec-05 16:37
g00fyman21-Dec-05 16:37 
AnswerRe: generating asp:textbox in loop Pin
Christian Graus21-Dec-05 16:41
protectorChristian Graus21-Dec-05 16:41 
GeneralRe: generating asp:textbox in loop Pin
g00fyman22-Dec-05 1:21
g00fyman22-Dec-05 1:21 
GeneralRe: generating asp:textbox in loop Pin
g00fyman22-Dec-05 2:18
g00fyman22-Dec-05 2:18 
GeneralRe: generating asp:textbox in loop Pin
Christian Graus22-Dec-05 9:34
protectorChristian Graus22-Dec-05 9:34 
GeneralRe: generating asp:textbox in loop Pin
g00fyman22-Dec-05 17:22
g00fyman22-Dec-05 17:22 
ok i have changed it back to a repeater, and i cannot get it to update now.

is this the same problem or similar that is listed here [ http://support.microsoft.com/?kbid=197428 ] or is there another problem i am missing in my code?


< asp : Repeater id="cartItems" runat="server" DataSource="<%# orderSummaryDataSet %>" DataMember="OrderSummary1" >
< HeaderTemplate >
<table width=85% cellpadding="3" cellspacing="3">
<tr class="artistType" vAlign="middle" align="center">
<th>&nbsp;</th>
<th>Product Code</th>
<th>Quantity</th>
<th>Item Cost</th>
<th>Item Total</th>
<th>Cart Total</th>
</tr>
<tr class="artistType" vAlign="middle" align="center">
<th colspan="5">
&nbsp;</th>
<th style="color:red;">
<%# CartTotal %>
</th>
</tr>
</ HeaderTemplate >
< FooterTemplate >
</table>
< /FooterTemplate >
< ItemTemplate >
<tr class="artistType" vAlign="middle" align="center">
<td>
<input type="hidden" name="code" id="code" runat="server" value='<%# DataBinder.Eval(Container.DataItem, "OrderSummaryProductCode") %>' / >
<img src='<%# DataBinder.Eval(Container.DataItem,"OrderSummaryImageUrl") %>' height="<%# THUMB_HEIGHT %>" width="<%# THUMB_WIDTH %>" />
</td>
<td><%# DataBinder.Eval(Container.DataItem, "OrderSummaryProductCode") %></td>
<td>
< asp:TextBox AutoPostBack="false" id="txtQty" style="width:25px;" Text='<%# DataBinder.Eval(Container.DataItem, "OrderSummaryProductQuantity") %>' runat="server" MaxLength="2" / ></td>
<td>$<%# DataBinder.Eval(Container.DataItem, "OrderSummaryProductCost") %></td>
<td>$<%# DataBinder.Eval(Container.DataItem, "OrderSummaryProductTotal") %></td>
<td></td>
</tr>
< /ItemTemplate >
< /asp:Repeater >


and this is the btnUpdate click event for a single button that should update my dataset


private void btnUpdateCart_Click(object sender, System.EventArgs e)
{
foreach(RepeaterItem item in cartItems.Items)
{
TextBox qtyCtrl = (TextBox)item.FindControl("txtQty");
HtmlInputHidden codeCtrl = (HtmlInputHidden)item.FindControl("code");

try
{
int qty = Int32.Parse(qtyCtrl.Text);
string code = codeCtrl.Value;
BasicCart cart = (BasicCart)Session["cart"];
cart.SetQuantity(code, qty);
} catch { /* TODO : fix this */ }
}
}

when i step i through the code, qty is the value before i change it in the form.

any ideas please ?, sorry about formatting, couldnt get it to preformat with tags

kind regards,
g00fy
GeneralRe: generating asp:textbox in loop Pin
analytiks22-Dec-05 19:33
analytiks22-Dec-05 19:33 
Questionjpeg image DPI property Pin
MichaelBlane21-Dec-05 8:17
MichaelBlane21-Dec-05 8:17 
QuestionASP.NET and JAVASCRIPT Pin
MinaFawzi20-Dec-05 22:35
MinaFawzi20-Dec-05 22:35 
AnswerRe: ASP.NET and JAVASCRIPT Pin
enjoycrack21-Dec-05 7:03
enjoycrack21-Dec-05 7:03 
GeneralRe: ASP.NET and JAVASCRIPT Pin
MinaFawzi21-Dec-05 22:23
MinaFawzi21-Dec-05 22:23 
GeneralRe: ASP.NET and JAVASCRIPT Pin
analytiks22-Dec-05 1:12
analytiks22-Dec-05 1:12 
GeneralRe: ASP.NET and JAVASCRIPT Pin
MinaFawzi22-Dec-05 5:02
MinaFawzi22-Dec-05 5:02 
GeneralRe: ASP.NET and JAVASCRIPT Pin
analytiks22-Dec-05 19:28
analytiks22-Dec-05 19:28 
GeneralRe: ASP.NET and JAVASCRIPT Pin
MinaFawzi24-Dec-05 3:36
MinaFawzi24-Dec-05 3:36 
GeneralRe: ASP.NET and JAVASCRIPT Pin
analytiks25-Dec-05 2:38
analytiks25-Dec-05 2:38 
GeneralRe: ASP.NET and JAVASCRIPT Pin
MinaFawzi25-Dec-05 13:31
MinaFawzi25-Dec-05 13:31 
GeneralRe: ASP.NET and JAVASCRIPT Pin
enjoycrack22-Dec-05 6:52
enjoycrack22-Dec-05 6:52 
QuestionODBC on the WebServer Pin
gmhanna20-Dec-05 10:25
gmhanna20-Dec-05 10:25 
GeneralRe: ODBC on the WebServer Pin
Andy Brummer20-Dec-05 11:17
sitebuilderAndy Brummer20-Dec-05 11:17 
GeneralRe: ODBC on the WebServer Pin
gmhanna20-Dec-05 12:47
gmhanna20-Dec-05 12:47 
AnswerRe: ODBC on the WebServer Pin
Guffa20-Dec-05 21:31
Guffa20-Dec-05 21:31 
GeneralRe: ODBC on the WebServer Pin
gmhanna21-Dec-05 5:42
gmhanna21-Dec-05 5:42 

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.