 |
| Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 6th, 2007, 08:57 AM
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Link Buttons Fail in Published Website
I have been developing databases for years, but I am new to web development. I built a website using Visual Web Developer 2005 Express Edition with VB code behind pages and deployed it to a web server. When I open the site in debug mode through the Web Developer everything works fine. When opening the site using IE, the buttons work, but when I click on other controls like linkbuttons and listboxes, nothing happens. I've searched the internet for solutions but couldn't find anything. Any hints as to what might be happening would be greatly appreciated.
|
|

September 6th, 2007, 09:30 AM
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Here is the code for the Click event of the linkbutton, "lnkEditTables". It simply opens a page called "EditTables". As an experiment, I added a button control, "button1" with the exact same code - and it works, while the linkbutton does not:
Protected Sub lnkEditTables_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkEditTables.Click
Response.Redirect("EditTables.aspx")
End Sub
I noticed that if I place my mouse over the IE title bar after clicking the link, I get an hourglass as if something has hung.
|
|

September 6th, 2007, 10:11 AM
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes, in debug mode I have stepped through the code and it works as expected - the EditTables.aspx page opens. The problem only occurs when opening the website using Internet Explorer in production. Am I correct that it is not possible to set a breakpoint in the deployed website running in production where debug="false" in Web.config? I should note that the problem has occurred only in production with every link button and list box in my project (20 or so), but not in debug mode. The button controls work fine in both debug mode and in production. The click events are associated with the correct method for every control.
|
|

September 6th, 2007, 10:29 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
Yes, when the debug switch is set to false no symbols are loaded for your project so you can not step through it.
What doesn't make sense to me is that in debug mode your LinkButtons work fine but in Production they just stop working. Imar or Peter may have an idea as to what the problem is, but I do not. Thats down right strange.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
Professional IIS 7 and ASP.NET Integrated Programming
================================================== =========
|
|

September 6th, 2007, 10:53 AM
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I agree. Thanks for trying. How would I contact Imar or Peter? Thanks again.
|
|

September 6th, 2007, 11:01 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
Well, you could wait for them to see this particular thread or you could send them a message through the forum. Imar's user name is Imar and peter's is planoie.
My suggestion would be, if you send them a message, to just say that I thought they may be of some help with your problem and give them a link to this thread. (No sense in rehashing your problem in email)
hth.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
Professional IIS 7 and ASP.NET Integrated Programming
================================================== =========
|
|

September 6th, 2007, 01:44 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
This is definitely a strange problem.
Have you tried assemblies compiled in debug mode on production? I'm not clear if you tried this or not. I think when you refer to "debug" you mean on your development machine.
This sounds like a core ASP.NET issue. Can you compare the rendered output of the page in development with that of production to verify that everything is rendering correctly? Is the right version of ASP.NET selected on the server application? Are other postbacks firing correctly?
What about if you create a very simple page with a couple different controls and see if some simple operations work so you can rule out a fundamental problem.
-Peter
|
|

September 6th, 2007, 03:16 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
What is the difference between your debug and production environment?
Could it just be that in the browser you use to access your production environment JavaScript is disabled?
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|
|
 |