Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
- thanks for the suggestion but these cookiecuter solutions are
worthless. If there is someone who knows how postbacks and usercontrols
work, helpful information would be appreciated.
this is a very simple matter that works perfectly fine in dev
envoronmnet (asp.net only) but when moved to umbraco it has been nothing
but problems and a waste of over two days time. The issue is with a
very very simple usercontrol in an umbraco masterpage like such.
<%@ Master Language="C#" MasterPageFile="~/masterpages/masterpage.master" Inherits="secure_check" AutoEventWireup="true" %><asp:content ContentPlaceHolderId="CP2" runat="server"><ajaxToolkit:ToolkitScriptManager ID="tsm1" runat="server" LoadScriptsBeforeUI="false" CombineScripts="true" EnablePartialRendering="true" ScriptMode="Release" /> <section id="content"> <umbraco:Macro Alias="myMacro1" runat="server">umbraco:Macro> section>asp:content>
THE PROBLEM: simple -- no postback event occurs when clicking the
checkbox; an autopostback should occur and the field should change to
either "checked" or "unchecked" yet no postback. I am looking at the
get/post request captures in firebug and each time the checkbox is
selected no post occurs; simply the page refreshes the state. The page
is in secure mode (SSL). Again this is pretty simple and basic and it
works fine in asp.net dev testing environment. Oh, yes the page has a
"form" with a "runat" equals server tag. Yes i have check the "browse
properties" of the macro -- no problems. Does anyone have ideas?
since i cant seem to get any answers from the "gurus" i fixed the problem myself. The is definitely an Umbraco bug.
in my usercontrol i have the following addtional control
<asp:ImageButton ID="tbcfaqs" runat="server" CausesValidation="false" src="image path here" PostBackUrl="~/path1/pagename.aspx" />
plus this control:
<asp:CheckBox ID="chgpwd" runat="Server" AutoPostBack="true" OnCheckedChanged="chgpwd_CheckedChanged" Checked="False" />
now when the check box is "clicked" what umbraco is doing is interpreting the postbackurl of the imagebutton as the postback for the page and posting the entire content back to the path listed in the postbackurl of the imagebutton. This is absolutely incorrect. Microsoft created the postbackurl back in 2.0 to accomodate the need to post back to specific url which may be different then the original page. It would be helpful if you would log this as a bug and fix it so someone else doesn't have to waste 1.5 days tracking down a simple issue.
I posted an answer to the post kunt1 put here: http://our.umbraco.org/forum/developers/extending-umbraco/32659-usercontrols-don't-work-with-postback
Please refrain from cross posting, I can't really think of any user forums, where cross posting is polite, and this isn't one of them.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted