Click here to Skip to main content
15,886,199 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Asp.net License Pin
N a v a n e e t h13-Sep-09 6:22
N a v a n e e t h13-Sep-09 6:22 
GeneralRe: Asp.net License Pin
Christian Graus13-Sep-09 12:14
protectorChristian Graus13-Sep-09 12:14 
GeneralRe: Asp.net License Pin
N a v a n e e t h13-Sep-09 16:02
N a v a n e e t h13-Sep-09 16:02 
QuestionProblem with ajax calender extender Pin
J.Vinod12-Sep-09 20:12
J.Vinod12-Sep-09 20:12 
AnswerRe: Problem with ajax calender extender Pin
Abhijit Jana12-Sep-09 21:20
professionalAbhijit Jana12-Sep-09 21:20 
QuestionPlaying MP3 Files Dynamically in ASP.Net App Pin
dboy22112-Sep-09 16:03
dboy22112-Sep-09 16:03 
AnswerRe: Playing MP3 Files Dynamically in ASP.Net App Pin
Christian Graus13-Sep-09 12:15
protectorChristian Graus13-Sep-09 12:15 
QuestionCustom Control Stops My Image Button Working! Pin
Ginozzzz12-Sep-09 5:45
Ginozzzz12-Sep-09 5:45 
Hi All,
I have an asp ImageButton within a gridview. Normally, I click the button, and the row upon which the button is in, is deleted.

It worked well for a long time, until one day it didn't.
I have spend exactly 12 hours now trying to work out what has happened, and I have found the problem.... I just don't know how to solve it.

The problem comes from me having added a custom control to the page.

I registered the control like this:
<%@ Register TagPrefix="user" TagName="AddressForm"  Src="UserControl/AddressForm.ascx" %>


The control is pulled into the page like this:
<fieldset style="margin-left:10px;margin-right:10px">
<div class="cart_spacer"></div>
<legend><span style="color:#c90101;font-size:12px; font-family: Arial, Helvetica, sans-serif">Shipping Address</span></legend>
<div style="padding:5px 5px 5px 5px" class="productSubHeading">
Enter the address where you would normally want your order shipped. <br /><i class="cart_small">(this can be changed whenever you place an order)</i>
</div>
<div class="cart_spacer"></div>
<user:AddressForm
    id="shippingAddress"
    ShowCopyCheckBox="False"
    CopyCheckBoxText="" 
    Runat="server" />
</fieldset>


The Gridview looks like this:
 <asp:GridView ID="grd_Cart" runat="server" 
 AutoGenerateColumns="False" Width="100%"
 OnRowDataBound="grdCart_RowDataBound" 
 DataKeyNames="TempDetId"
 DataSourceID="sqlGrdCart"
 GridLines="None"
 BorderColor="#CCCCCC"
 BorderWidth="1px"
 BorderStyle="Solid"
 AlternatingRowStyle-BackColor="#F2F2F2"
 HeaderStyle-BorderColor="#CCCCCC"
 HeaderStyle-BorderStyle="Solid"
 HeaderStyle-BorderWidth="1px"
 EmptyDataText="There are no items in your shopping cart"
 >
  <Columns>
<asp:BoundField DataField="TempDetID" Visible="false" ShowHeader="false" />
  <asp:TemplateField>
  <ItemTemplate>
  <a href="ShowImage.ashx?img=<%#Eval("SwatchImage")%>&path=BlindsImages" class="lboxImg">
  <img src='ShowImage.ashx?img=<%#Eval("SwatchImage")%>&h=30&w=30&path=BlindsImages' title="click for larger image" width="40px" style="text-align:center"  alt='<%#Eval("SwatchImage")%>' style="border:0px;" /></a>
  </ItemTemplate>
  </asp:TemplateField> 
<asp:TemplateField HeaderText="Description" HeaderStyle-CssClass="headerstyle" HeaderStyle-HorizontalAlign="Left" ShowHeader="true" HeaderStyle-VerticalAlign="Middle">
<ItemTemplate>
<asp:Label ID="lblDesc" runat="server" style="padding:5px 5px 5px 5px" Width="270px" text='<%# Eval("LineDesc") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Qty" HeaderStyle-Width="30px" HeaderStyle-HorizontalAlign="Center" ShowHeader="true">
<ItemTemplate>
<asp:TextBox ID="txtQty" runat="server" alt='<%# Eval("TempDetId") %>' 
AutoPostBack="false" 
onchange="CheckPostBack(this);updateQty(this.alt,this.value)" style="padding:5px 2px 5px 2px; text-align:center" width="30px" Text='<%# Bind("Qty") %>'></asp:TextBox>
 <asp:RangeValidator ID="valQty" Type="Integer" MinimumValue="1" MaximumValue="1000" ControlToValidate="txtQty" runat="server" ErrorMessage="*"></asp:RangeValidator>
</ItemTemplate>
 <HeaderStyle HorizontalAlign="Center" Width="30px" />
</asp:TemplateField>
  <asp:BoundField DataField="OrigPrice" HeaderText="Price Each" ItemStyle-Font-Strikeout="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" DataFormatString="{0:C}" HtmlEncode="false" SortExpression="OrigPrice" >
   <HeaderStyle HorizontalAlign="Center" />
   <ItemStyle Width="50px" />
   </asp:BoundField>
   <asp:BoundField DataField="SalePrice" HeaderText="Web Price" ItemStyle-ForeColor="Red" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" DataFormatString="{0:C}" HtmlEncode="false" SortExpression="SalePrice" >
   <HeaderStyle HorizontalAlign="Center" />
   <ItemStyle Width="50px" />
   </asp:BoundField>   

    <asp:TemplateField HeaderText="Delivery or Installation?"  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" 
    HeaderStyle-Width="80px" ItemStyle-Font-Size="10px" ShowHeader="true">
<ItemTemplate> 
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:Label runat="server" ID="lblDelType" style="padding:5px 2px 5px 2px; text-align:center" Width="100%" Text='<%# Eval("DelType") %>'></asp:Label>
</ContentTemplate>
<Triggers><asp:AsyncPostBackTrigger ControlID="butPostBack" EventName="Click"/> </Triggers>
</asp:UpdatePanel>
</ItemTemplate>
    <HeaderStyle HorizontalAlign="Center" Width="30px" />
   </asp:TemplateField>   
<asp:TemplateField ShowHeader="false" ItemStyle-Width="30px">
<ItemTemplate>
<asp:ImageButton ImageUrl="images/TrashCan.gif" runat="server" CommandArgument='<%# Eval("TempDetId") %>'  
OnCommand="butDel"
CommandName="Delete" ToolTip="Delete / Remove" />
</ItemTemplate>
</asp:TemplateField>
   </Columns>
 </asp:GridView>


So can anyone tell me why my imagebutton won't fire any code event when this user:AddressForm is on the page? If i remove it from the page but leave the register block in there, it all works fine.

Apologises for posting so much code, I am anticipating that you'll need to see it.
AnswerRe: Custom Control Stops My Image Button Working! Pin
Blikkies12-Sep-09 5:58
professionalBlikkies12-Sep-09 5:58 
GeneralRe: Custom Control Stops My Image Button Working! Pin
Ginozzzz12-Sep-09 8:10
Ginozzzz12-Sep-09 8:10 
AnswerRe: Custom Control Stops My Image Button Working! Pin
dan!sh 12-Sep-09 9:12
professional dan!sh 12-Sep-09 9:12 
GeneralRe: Custom Control Stops My Image Button Working! Pin
Ginozzzz12-Sep-09 14:10
Ginozzzz12-Sep-09 14:10 
QuestionProblem with Custom Errors Pin
nagendrathecoder12-Sep-09 1:41
nagendrathecoder12-Sep-09 1:41 
AnswerRe: Problem with Custom Errors Pin
Parwej Ahamad12-Sep-09 1:57
professionalParwej Ahamad12-Sep-09 1:57 
GeneralRe: Problem with Custom Errors Pin
nagendrathecoder12-Sep-09 2:13
nagendrathecoder12-Sep-09 2:13 
Questionunable to generate or create AJAX controls in code behind file Pin
coolsharath12-Sep-09 1:21
coolsharath12-Sep-09 1:21 
AnswerRe: unable to generate or create AJAX controls in code behind file Pin
Parwej Ahamad12-Sep-09 2:00
professionalParwej Ahamad12-Sep-09 2:00 
GeneralRe: unable to generate or create AJAX controls in code behind file Pin
coolsharath12-Sep-09 2:28
coolsharath12-Sep-09 2:28 
Questionthe position of horizental line Pin
Seraph_summer11-Sep-09 23:31
Seraph_summer11-Sep-09 23:31 
AnswerRe: the position of horizental line Pin
Abhijit Jana11-Sep-09 23:46
professionalAbhijit Jana11-Sep-09 23:46 
GeneralRe: the position of horizental line Pin
Seraph_summer12-Sep-09 0:01
Seraph_summer12-Sep-09 0:01 
GeneralRe: the position of horizental line [modified] Pin
Manas Bhardwaj12-Sep-09 0:10
professionalManas Bhardwaj12-Sep-09 0:10 
GeneralRe: the position of horizental line [modified] Pin
Abhijit Jana12-Sep-09 0:41
professionalAbhijit Jana12-Sep-09 0:41 
GeneralRe: the position of horizental line Pin
Abhijit Jana12-Sep-09 0:41
professionalAbhijit Jana12-Sep-09 0:41 
GeneralRe: the position of horizental line [modified] Pin
Seraph_summer12-Sep-09 4:51
Seraph_summer12-Sep-09 4:51 

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.