473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Javascript error in Imagebutton

107 100+
I am getting an error while clicking the imagebutton.
I have given the link in the postbackurl
The error showing is the "Webform_PostbackOption" is undefined
Any suggestion for solving this error
Jul 18 '07 #1
8 1986
giveDsolution
107 100+
help me guys........
Jul 18 '07 #2
giveDsolution
107 100+
Any needful suggestion
Jul 18 '07 #3
can you paste the code.....
Jul 18 '07 #4
giveDsolution
107 100+
can you paste the code.....

Which code?????
Actually in the postbackurl property of the Imagebutton i have give a link to which it will redirect on clicking that image button.
Actually few day before it was working fine..but now it shows a javascript error......Webform_Postbackoption is undefiened
Jul 18 '07 #5
i mean to say your page code.....
Jul 18 '07 #6
giveDsolution
107 100+
i mean to say your page code.....
Aspx Page coding
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%"
DataKeyNames="vchBrochureId" border="0" CellSpacing="1" CellPadding="2" AllowPaging="true"
PageSize="10">
<Columns>
<asp:TemplateField>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</EditItemTemplate>
<HeaderTemplate>
<input name="cbAll" value="cbAll" type="checkbox" onclick="SelectAll(cbAll,'GridView1','form1')" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Title" DataField="vchTitle">
<ItemStyle HorizontalAlign="Center" Width="60%" />
</asp:BoundField>
<asp:BoundField HeaderText="Date" DataField="dtmCreatedOn" DataFormatString="{0:dd-MMM-yyyy}"
HtmlEncode="False">
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
&nbsp;<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/editicon.gif"
PostBackUrl='<%#"~/Admin/brochureAdd.aspx?Bid=" & Databinder.Eval(Container.DataItem,"vchBrochureId" ) %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="tblHeader" />
<AlternatingRowStyle CssClass="tdData1" />
<PagerStyle HorizontalAlign="Right" />
</asp:GridView>
Jul 18 '07 #7
giveDsolution
107 100+
No Solution ???????????
Jul 18 '07 #8
sorry for the delay
I just did minor changes in your code
and its working fine....
change the postbackurl of the image button to this
Expand|Select|Wrap|Line Numbers
  1. PostBackUrl='<%#"~/Admin/brochureAdd.aspx?Bid=" + Databinder.Eval(Container.DataItem,"vchBrochureId") %>'
  2.  
and let me know if this works fine..............
Jul 20 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: JIM | last post by:
Hello, I've an asp:Imagebutton on my form with the visible property set to false <asp:Imagebutton ID="tstImage" runat=Server visible=False> How can I set the visible propery to true using a...
0
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to...
1
by: Hrvoje Vrbanc | last post by:
Hello all, I have a DataList control displaying data from the database (some products). There are also TexBox controls and ImageButton controls in the two columns of the DataGrid. I would like...
4
by: TJS | last post by:
how do I get "onSubmit" to work in .net ? <Form id="Form1" name="Form1" method="post" onSubmit="return validateStandard(this, 'error');" runat="server">
12
by: tshad | last post by:
I have the following code that attaches a Javascript confirm box to my checkbox. When I select the checkbox, the window comes up fine, but it never executes the XfertoDefault_Click function when I...
3
by: DanG | last post by:
Hi I used to have an ImageButton in my datagrid, and referenced the control in the javascript with: var fld = document.getElementById('datagrid__ctl2_btnEdit'); alert(fld); //returns "" >Good...
10
by: Edwin Knoppert | last post by:
I have an asp.net imagebutton with a clickevent. I have enclosed an anchor around the image and a small text. If i click the image the event is executed (while the href of the anchor shows in the...
1
by: kjtaylor | last post by:
I want to use the return value of a javascript function into a .net webgrid. However, when I click on the imagebutton it takes in a variable passed in from javascript function to produce the image...
0
by: Sully | last post by:
Hi Guys, I have this about 98% done and I cannot get it work properly. I have a Repeater bound to a MySQL DataSource, inside the Repeater I have an ImageButton, outside the repeater I have a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.