Weird problem

C

Constandinos

Hi

I have a very weird problem and very difficult to solve. There is a solution that I already know, but that is too time consuming and I need a quick answer if there is one

I have a big asp.net project that until earlier today was working fine and it was ready for Monday’s release. I did some minor changes to make it look nicer, some small changes here and there and suddenly I notice that the JavaScript function __doPostBack which I used a lot (mixed quite a lot of JavaScript and asp.net) stopped triggering any events. What I have done in the project is that I have a list where you can select something and a popup comes up and when the processing is finished, if the item on the list is changed I use the __doPostBack function to call a hidden linkbutton's click method and reload the list.

Similar functionality occurs in many places of the project and what happened is that it seems the __dopostback cannot find the methods any more. So, if I have this line __doPostBack('LinkButton1',''); the LinkButton1_Click method will not trigger! I have tried a lot of things like create a new project with all pages, controls, etc, but the problems still exists. Also what I have tried is adding new linkbuttons and call them like __doPostBack('newLinkButton1',''); and the newLinkButton1_Click method will trigger! That is my only possible solution, but that is a lot of work in a big project. I understand that if someone did not run into this kind of problem is highly unlikely to know the answer to it, but may be there are some people who can answer this question

I know that the problem is my code somewhere, but I have no idea where to look into! Any help will be appreciated

Thanks in advance
Constandino
 
M

Martin Dechev

Hi, Constandinos,

Can you post some html code with a problematic control in it?

The first thing to check is the runat="server" attribute. After that, try to
remove all other attributes thus eliminating all the additional
functionality and debug the class.

Greetings
Martin
Hi!

I have a very weird problem and very difficult to solve. There is a
solution that I already know, but that is too time consuming and I need a
quick answer if there is one.
I have a big asp.net project that until earlier today was working fine and
it was ready for Mondayâ?Ts release. I did some minor changes to make it
look nicer, some small changes here and there and suddenly I notice that the
JavaScript function __doPostBack which I used a lot (mixed quite a lot of
JavaScript and asp.net) stopped triggering any events. What I have done in
the project is that I have a list where you can select something and a popup
comes up and when the processing is finished, if the item on the list is
changed I use the __doPostBack function to call a hidden linkbutton's click
method and reload the list.
Similar functionality occurs in many places of the project and what
happened is that it seems the __dopostback cannot find the methods any more.
So, if I have this line __doPostBack('LinkButton1',''); the
LinkButton1_Click method will not trigger! I have tried a lot of things like
create a new project with all pages, controls, etc, but the problems still
exists. Also what I have tried is adding new linkbuttons and call them like
__doPostBack('newLinkButton1',''); and the newLinkButton1_Click method will
trigger! That is my only possible solution, but that is a lot of work in a
big project. I understand that if someone did not run into this kind of
problem is highly unlikely to know the answer to it, but may be there are
some people who can answer this question!
I know that the problem is my code somewhere, but I have no idea where to
look into! Any help will be appreciated!
Thanks in advance,
Constandinos
Community Website: http://www.dotnetjunkies.com/newsgroups/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top