473,394 Members | 1,750 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,394 software developers and data experts.

Postback stops working

I have a web application. I had several web form buttons and a
datagrid. I cut and pasted some of the buttons to change the layout
around, and also cut/pasted the datagrid to move it.

Now when I click any of the buttons they do nothing.
A hyperlink column in the datagrid which previously opened files now
does nothing.

I put a break point in one of the buttons and it worked normally.
After I removed the breakpoint that button still works normally now,
but the others do not. I was able to fix all the buttons
functionality by putting in a breakpoint and then removing it.
However, I can't break for the hyperlink and so I cannot figure out how
to fix this.

What is wrong? Why would it stop working when there has been no code
changes? Fix?

Thanks!

Nov 19 '05 #1
5 1416
John,

check if the EventHandlers are associated with your code in the code behind
file. For VB.NET you should see sth like:

private sub Button1_Click(sender as object, e as eventargs) handles
Button1.Click

Tell me if this worked for you.

Regards

--
---------------------------------------
Daniel Walzenbach
MCP

www.walzenbach.net

<jo********@yahoo.com> schrieb im Newsbeitrag
news:11**********************@f14g2000cwb.googlegr oups.com...
I have a web application. I had several web form buttons and a
datagrid. I cut and pasted some of the buttons to change the layout
around, and also cut/pasted the datagrid to move it.

Now when I click any of the buttons they do nothing.
A hyperlink column in the datagrid which previously opened files now
does nothing.

I put a break point in one of the buttons and it worked normally.
After I removed the breakpoint that button still works normally now,
but the others do not. I was able to fix all the buttons
functionality by putting in a breakpoint and then removing it.
However, I can't break for the hyperlink and so I cannot figure out how
to fix this.

What is wrong? Why would it stop working when there has been no code
changes? Fix?

Thanks!

Nov 19 '05 #2

I have experienced the same symptoms that you describe. The thing tha
cures 8/10 is to simply, re-hook the event handlers for your objects.
For example, a button that once worked, but no longer does... do thi
<-- in the designer, Double-Click the object (in this case the button
again, and you should be transported back to the button click event.
Try the button again on the web. In my experiences, for some reason
the event handlers in the code behind gets lost, even though you se
them in the initialize section of the code....try that and see if i
work. If not, there are other things to check, but like I said....8/1
times that works.

Ralp

--
rvira
-----------------------------------------------------------------------
rviray's Profile: http://www.msusenet.com/member.php?userid=421
View this thread: http://www.msusenet.com/t-187097518

Nov 19 '05 #3
Perhaps, as you were cutting and pasting, the form tags in the page are not
around the buttons, etc.

If they are not within form tags they will not do a postback unless you do
some javascript majic in the onClick().

"jo********@yahoo.com" wrote:
I have a web application. I had several web form buttons and a
datagrid. I cut and pasted some of the buttons to change the layout
around, and also cut/pasted the datagrid to move it.

Now when I click any of the buttons they do nothing.
A hyperlink column in the datagrid which previously opened files now
does nothing.

I put a break point in one of the buttons and it worked normally.
After I removed the breakpoint that button still works normally now,
but the others do not. I was able to fix all the buttons
functionality by putting in a breakpoint and then removing it.
However, I can't break for the hyperlink and so I cannot figure out how
to fix this.

What is wrong? Why would it stop working when there has been no code
changes? Fix?

Thanks!

Nov 19 '05 #4
Thanks for the responses. The problem is that it is a LinkButton
inside a DataGrid. I can't see to get it to work even after deleting
it out completely and putting a new one in. The code is below.

<asp:TemplateColumn><ItemTemplate>
<asp:LinkButton id="LinkButton1" runat="server" CommandArgument='<%#
DataBinder.Eval(Container, "DataItem.FullName") %>' CommandName='<%#
DataBinder.Eval(Container, "DataItem.FileName") %>'>
<%# DataBinder.Eval(Container, "DataItem.FileName") %></asp:LinkButton>
</ItemTemplate></asp:TemplateColumn>

Nov 19 '05 #5
GJK
Could you make sure onItemCommand event on the datagrid is still hooked
correctly.

_GJK

"jo********@yahoo.com" wrote:
Thanks for the responses. The problem is that it is a LinkButton
inside a DataGrid. I can't see to get it to work even after deleting
it out completely and putting a new one in. The code is below.

<asp:TemplateColumn><ItemTemplate>
<asp:LinkButton id="LinkButton1" runat="server" CommandArgument='<%#
DataBinder.Eval(Container, "DataItem.FullName") %>' CommandName='<%#
DataBinder.Eval(Container, "DataItem.FileName") %>'>
<%# DataBinder.Eval(Container, "DataItem.FileName") %></asp:LinkButton>
</ItemTemplate></asp:TemplateColumn>

Nov 19 '05 #6

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

Similar topics

0
by: Mike Bridge | last post by:
Hi- I'm having some problems with postback (using .net 1.1 on XP Professional). All my postback links stop functioning after a while. After a certain point, the postback links suddenly do...
0
by: Alan Silver | last post by:
Hello, I have a page where I use URL rewriting, so the user sees something like... http://www.domain.com/item_12.aspx but the real URL is... ...
1
by: Jethro | last post by:
Hi all working on someone elses code ! I have a javascript call at the end of the <BODYtag, which sets up a calendar utility connected to an image button. This works fine. However there is a...
2
by: Paul | last post by:
I've written som junk code below to show a problem I'm getting: On a page I've got a dropdownlist and a button using submit behaviour: <asp:DropDownList ID="tester" runat="server"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...

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.