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

Mystery ASP.NET Error (No one seems to have a clue)


How do I force my Page to Page_Load when user clicks browser's Back button?
I am trying to avoid this error, that I get when I hit back button on my
browser and click on my dynamically generated button:

"An error has occurred because a control with auto-generated id '_ctl7'
could not be located to raise a postback event. To avoid this error,
explicitly set the ID property of controls that raise postback events."

I did Google on this error, but nothing useful came up. At this time, I
have a theory that this results from the fact that when I click Back button,
my Page_Load function doesn't get invoked (page is cached). Then when I
click on my dynamically generated control on the page, I get that error
message.

I did several posts on this already. However, no one seems to have the
slightest clue of what exactly going on when this error is generated.
Amelyan


Nov 19 '05 #1
4 1065
Amelyan,

Did you try setting an explict ID property for your dynamically
created controls at the time of creation. This should resolve the
issue. Without setting an ID, the asp.net page parser may build a
control tree with unpredictable IDs which causes a problem like the one
you mentioned.

-Souri Challa

Nov 19 '05 #2
I agree with Soula. This is your problem.

"souri challa" <so*********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Amelyan,

Did you try setting an explict ID property for your dynamically
created controls at the time of creation. This should resolve the
issue. Without setting an ID, the asp.net page parser may build a
control tree with unpredictable IDs which causes a problem like the one
you mentioned.

-Souri Challa

Nov 19 '05 #3
The error message kind of gave it away didn't it!

"To avoid this error,
explicitly set the ID property of controls that raise postback events"

Lol
Nov 19 '05 #4

You are right, the error message is kind of self explanatory.

However, the mystery question that no one has answered, yet. Why does
it only happen when I click the Back button on my browser and click my
dynamically generated button again? Otherwise, it is working just fine.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #5

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

Similar topics

3
by: doug | last post by:
I am working on a C++ program in .NET. The compiler generates error messages that are associated with the wrong line numbers (which is extremely frustrating). Also, the debugger arrow is...
2
by: Todd Plambeck | last post by:
I have a website with about 100 users. They all seem to work fine except one. When they go from the main page to a page containing a webgrid containing delivery addresses, an error is thrown. ...
2
by: David | last post by:
I was experimenting with generating a Word file using ASP.NET, and lauching the web app did not cause any problems. Then out of the blue, this is happening to every asp.net app that I attempt to...
0
by: Chris Hayes | last post by:
I've seen that when an HTTP 400 error occurs ("Maximum request length exceeded") that some of my Session level variables and Cookies get "lost" is there a way to preserve them without resorting to...
1
by: robrobrob | last post by:
I have a C consloe application in windows using Visual Studio Pro 6.0 that gives a runtime error: Debug Error! During the scanf line. If I put a printf loop in after the scanf loop to print the...
2
by: TimR | last post by:
I am trying to create my first Web application in VS2005 and am pulling my hair out!!!! I cannot seem to get aspx pages to work from a locally installed copy of IIS. I am getting a...
2
by: =?Utf-8?B?S3Jpc2huYQ==?= | last post by:
Hi, I am devloping one web application using .net framework 2.0.One page has 7 dropdown list control.When i update the values first bind the values to the drop down llist then selected text...
10
by: julietbrown | last post by:
On first reading you could stop at ** and resume at the later ** as I think the problem must be in the part before the first **! Field X on Form A is the key field for another table T. User...
3
by: jaymzlx | last post by:
My old problem is solved, but im running into a new error. I figured I would start a new topic, sorry if this was incorrect to do. mysql error: You have an error in your SQL syntax; check the...
4
by: ebflute | last post by:
What is wrong with my SQL statement? I moved this application from a PHP4 server to a PHP5 server with a higher version of MySQL. It was working on the old server but now I am getting an error in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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.