Postback hanging

G

Grant Merwitz

Hi

I have a control on a web page with just a datagrid.
For some reason, post back is not working on this page.
You can view this page here:

http://www.workshare.com/company/blog/default2.aspx

Now, this page has a control on it that is a simple as:
<asp:DataGrid id="dg" runat="server"/>

The page using this is also simple:
<%@ Register TagPrefix="uc1" TagName="MyControl"
Src="../../UserControls/MyControl.ascx" %>
<form runat="server">
<uc1:MyControl id="MyControl1" runat="server"></uc1:MyControl>
<asp:Button id="btn" runat="server"/>
</form>

I have Attached an event on this button, that just writes hello to the page
private void btn_Click(object sender, System.EventArgs e)
{
Response.Write("HELLO");
}

Now, as you'll observe when you click the button, the page just hangs.
Why is this happening, and how can i fix this.
On Other pages, the post back works fine
http://www.workshare.com/test.aspx

And this also works perfectly in my development environment.
Its just on my server where this hangs


Details:
Server
Microsoft Windows Server 2003
ASp.Net version : v1.1.4322
IIS: 6.0
(No Service Packs) --> Is this the possible cause??

Development Machine
Microsoft Windows Server 2003
ASP.Net version:v1.1.4322
IIS: 6.0
(Service Pack 1)


Please help, i've been testing this for hours, and NOTHING

TIA
 
K

Karl Seguin [MVP]

Hello Grant,
There's a large viewstate, and when I play around a bit with the site, I'll
somtimes get disconnects. Try adding EnableViewState="False" to your grid,
from what you have there, there's no need for it to be enabled.

Karl
 
G

Grant Merwitz

Thanks mate, you were spot on.
Though it took me a while to get it to work.

Once i set the EnableViewState to false, the OnIndexChanged event would not
fire.
I got around this by databinding in the Page_Load everytime the page loaded

The event is now firing properly.
Thanks for your help

http://www.workshare.com/company/blog/Default.aspx --> The result working :)
 

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

Top