Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: AutoPostBack doesn't post back

$
0
0
Re: AutoPostBack doesn't post back
Web Connection 5.0
Re: AutoPostBack doesn't post back
Feb. 13, 2013
02:34 am
3PR05IMPSShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:Stein Goering
Ah yes...

Multiple forms are not allowed with WCF control pages as there are issues in tracking the form and control data. We inherited that from ASP.NET WebForms although off the top of my head I'm not sure why that would be really a problem. I think it has to do with the Postback javascript that gets injected using the first form and it might be using the wrong form.

This might be fixable by always forcing the name of the form to a specific name I suppose but that might end up having other side effects.

+++ Rick ---



The problem was that i had added a second form to the page. I had form1 which contained all my WCF controls - then added this below id:
<h1>Upload Custom Files</h1><formenctype="multipart/form-data"method="POST"action="/wconnect/AWUpload.awp"id="form2"> File to Upload: <inputtype="file"name="txtFileName"id="txtFileName"size="55" /><br /> Destination: <ww:wwWebTextBoxID="txtFilePath"runat="server"Text=""Width="480px"></ww:wwWebTextBox><br /><inputtype="submit"name="btnSubmit"value="Go" /></form>

My idea was to surround it with an <% IF %> block so it would normally be hidden unless the user selected the Upload option. But just its presence on the page appeared to zap the postback behavior. I've moved that form to a separate page and the original is working again.

--stein

Autopostback relies on a small snippet of JavaScript. If there's any JavaScript error on the page, that script might fail as well.

Check with a JavaScript debugger for any errors. if there aren't any, check and see if a postback is happening (ie. in FireBug/Chrome/IE Tools or Fiddler).

+++ Rick ---



I've got a radio button that switches my page between modes. I rely on AutoPostBack so my server code can respond when it changes. Here's the source:
<ww:wwWebPanelID="pnlLaunch"runat='server'> <ww:wwWebRadioButtonListID="lstAction"runat='server' RepeatDirection="Horizontal" AutoPostBack="True"><asp:ListItemValue="EDIT" Selected="True">Edit Templates</asp:ListItem><asp:ListItemValue="DOWNLOAD">Obtain Templates</asp:ListItem></ww:wwWebRadioButtonList>

So today this suddenly stopped posting back. I'm looking at the webconnect form and the server is clearly not getting hit. I had made some changes to the page, but to a different area. What could I have done to screw things up?

--stein







Rick Strahl
West Wind Technologies


from Berlin

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles