473,587 Members | 2,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp:button problems

Hi everyone,

I have the following shopping cart (basket view). However, Delete button in
my datagrid doesn't fire any events. Does anyone know why? (It's a user web
control)

<%@ Control Language="c#" AutoEventWireup ="false"
Codebehind="Sho ppingCart.ascx. cs" Inherits="TPSho ppingCart.Shopp ingCart1"
TargetSchema="h ttp://schemas.microso ft.com/intellisense/ie5"%>
<asp:datagrid id="DGShoppingC art" AutoGenerateCol umns="False" Width="650"
runat="server">
<Columns>
<asp:BoundColum n DataField="Prod uctID" HeaderText="Pro duct ID"
HeaderStyle-Font-Bold="True" HeaderStyle-CssClass="normt ext"
ItemStyle-CssClass="normt ext"></asp:BoundColumn >
<asp:BoundColum n DataField="Prod uctName" HeaderText="Pro duct"
HeaderStyle-Font-Bold="True" HeaderStyle-CssClass="normt ext"
ItemStyle-CssClass="normt ext"></asp:BoundColumn >
<asp:BoundColum n DataField="Pric e" HeaderText="Pri ce"
HeaderStyle-Font-Bold="True" HeaderStyle-CssClass="normt ext"
DataFormatStrin g="{0:c}" ItemStyle-CssClass="normt ext"></asp:BoundColumn >
<asp:BoundColum n DataField="Qty" HeaderText="Qua ntity"
HeaderStyle-Font-Bold="True" HeaderStyle-CssClass="normt ext"
ItemStyle-CssClass="normt ext"></asp:BoundColumn >
<asp:ButtonColu mn ButtonType="Pus hButton" CommandName="De lete"
Text="Delete"></asp:ButtonColum n>
</Columns>
</asp:datagrid>
<P>&nbsp;</P>
<P class="normtext " align="center"> <b>Total:</b>
<asp:label id="lblCurrency Sign" runat="server"
CssClass="normt ext">$</asp:label><asp: label id="lbTotalAmou nt"
runat="server" CssClass="normt ext" Font-Bold="False">
Label</asp:label></P>
<P align="center"> <asp:button id="BtnContinue " runat="server"
CssClass="butto n1" Text="Continue Shopping"></asp:button>&nbs p;
<asp:button id="BtnCheckout " runat="server" CssClass="butto n2"
Text="Checkout" ></asp:button></P>

As a test I have,

private void DGShoppingCart_ ItemCommand(obj ect source,
System.Web.UI.W ebControls.Data GridCommandEven tArgs e)
{
Response.Redire ct("http://www.google.com" );
}

It's doesn't even get to the event.

Any suggestions?

Thank you
Maz.
Jul 21 '05 #1
0 1572

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2174
by: RSB | last post by:
Hi Every one, Having tuff time to make this work .. i want to have a button and on my form say Delete button. So once i click on it i want to confirm "Are you sure?" on the Client Side and if client select "Cancel" then i want to ignore the action and if "OK" selected then i want to Execute a Server side Event or Procedure. Now what is...
11
4649
by: Frag | last post by:
Hi guys, I searched around without any clear answer. Tons of stuff, but nothing concrete. I am trying to call this Javascript function: function ButtonClicked() { alert("The button has been clicked."); }
4
2277
by: z. f. | last post by:
Hi, I'm having an aspx page with a server form. i have a grid with a delete button and below the grid, another area with inputs for inserting new values and an "add" button for submiting the lower area of the form. on the lower area i have validators for validating input.
7
3569
by: Venus | last post by:
Hello, I am trying to generate a dynamic form at runtime and would like to do it using "<asp: ..." form elements as follows Build up the string that is placed somewhere in the HTML code the same way like regular input fields can. strForm = "<form name=""myForm"" runat=""server"">" & vbCrLf strForm += "<asp:button name=""myName"" .......
4
2557
by: hb | last post by:
Hi, When I add an asp:button (ex: id=btnLog) on home.aspx, I need to create btnLog_Click() event in home.aspx.cs, and also link this event and the button in OnInit() method by adding: this.btnLog.Click +=new System.EventHandler(this.btnLog_Click); Now, I need to generate some asp:button dynamically in an asp:table, and assign the event...
1
3628
by: RUIZCJ | last post by:
Hi, I'm at my wits end!!! I have the following code. The submit button works on my home computer but when I copy the dll and the ASPX file to my host provider, the button does NOT fire. TIA RuizCJ
8
3874
by: tatemononai | last post by:
I had a beautiful script that was running, well, just beautifully. But then I decided to take a button that fired an event and place it inside a <asp:table. The event WILL NOT FIRE INSIDE THE TABLE!?! When I move the button outside the table, it works just fine. Inside the table, it doesn't. What gives?
0
258
by: Maziar Aflatoun | last post by:
Hi everyone, I have the following shopping cart (basket view). However, Delete button in my datagrid doesn't fire any events. Does anyone know why? (It's a user web control) <%@ Control Language="c#" AutoEventWireup="false" Codebehind="ShoppingCart.ascx.cs" Inherits="TPShoppingCart.ShoppingCart1"...
4
2005
by: Sean | last post by:
I have a situation whereby I need to modify the text string appearing on an ASP button with some text derived from a Javascript function. But I am unsure of the correct syntax to do so. Currently the I am just modifying the text in a SPAN next to the button as opposed to change the button text itself. But it's not ideal really. Currently...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.