I'm using Umbraco 4.6.1 and I have a user control in my dashboard with a simple button that is attached to an event. All the event does for now is a response.write. This isn't causing a postback though.
Form Code: <asp:Button ID="cmdTemp" OnClick="cmdTemp_Click" runat="server" Text="Click me" />
There's a known bug where the new Change Password dashboard control prevents other controls from posting back, you should be able to remove it for a workaround. See:
I do have one more question though. I want to programmatically go between tabs. I noticed that the URL /umbraco/dashboard.aspx?app=content will load the content area, but is there something I can append to the URL to get it to load a specific tab?
Unfortunately there's no built-in way to do that, howerver there is a client-side API for tabs although it's a little tricky. You might be able to pick up some tidbits from this thread though.
Dashboard User Control Not Posting Back
Hi All,
I'm using Umbraco 4.6.1 and I have a user control in my dashboard with a simple button that is attached to an event. All the event does for now is a response.write. This isn't causing a postback though.
Form Code:
<asp:Button ID="cmdTemp" OnClick="cmdTemp_Click" runat="server" Text="Click me" />
Event Code:
protected void cmdTemp_Click(object s, EventArgs e)
{
Response.Write("Here");
}
I get an error if I compile and try to run without the cmdTemp_Click event existing, but when it is there and compiled nothing fires.
Any thoughts?
Thanks,
Jay
Hi Jay,
There's a known bug where the new Change Password dashboard control prevents other controls from posting back, you should be able to remove it for a workaround. See:
http://our.umbraco.org/forum/developers/extending-umbraco/18795-Custom-dashboard-item-not-respecting-onclick?p=0
http://umbraco.codeplex.com/workitem/30044 (vote it up if it's your issue:) )
-Tom
Hey Tom,
That was it. :) Thanks.
I do have one more question though. I want to programmatically go between tabs. I noticed that the URL /umbraco/dashboard.aspx?app=content will load the content area, but is there something I can append to the URL to get it to load a specific tab?
Thanks,
Jay
Unfortunately there's no built-in way to do that, howerver there is a client-side API for tabs although it's a little tricky. You might be able to pick up some tidbits from this thread though.
-Tom
is working on a reply...