Showing posts with label buttons. Show all posts
Showing posts with label buttons. Show all posts

Wednesday, March 28, 2012

Postback with button IN Update panel

Hello,

Q, I have 2 update panel's, one panel has 3 button's in it, say button1, button2, button3. Now i need to find a way to have a whole page postback with button1 (in update panel1) and a partial postback on button2 (also in panel1) . Is this posible.

Thanks in advange

Greetings Henk

hello.

well, you can try to add a dummy button outside the panel and then when the user clicks the button you'd call the click method over the other button...


In Atlas 1.0 we'll have a way to tell the UpdatePanel that certain controls should cause a regular postback even though they're inside the UpdatePanel. For now you'll have to use a workaround (such as the one described previously).

Thanks,

Eilon


Hmm, I tryed that, but that did not sucseed. I get the error btnDumie does not exist or sumthing like that. the problem is (I think that the submit button is only visible after an panelupdate, so that panel can't acces other elements on the page??)

I hope there is another sollution.


If it's possible in your scenario you could try to divide up your page such that the regular-postback button isn't inside an UpdatePanel. Once Atlas 1.0 is released you'll be able to do this very easily, but it's not quite ready yet.

Thanks,

Eilon


I am having the same issue. When is Atlas 1.0 due for release?

Thanks,

Murali


Here's the Atlas roadmap:http://weblogs.asp.net/scottgu/archive/2006/09/11/_2200_Atlas_2200_-1.0-Naming-and-Roadmap.aspx

Thanks,

Eilon


hello.

well, that post gives some clues, but no spcific date. btw, when are you guys start sharing the current versions you're developing with us? after all, i've been using atlas for months now and i've seen several posts where you guys say something like: "well, in v1.0 that problem is solved" or "you'll be able to do that easilly"...this just isn't enough!

according to the team's comments, it's as if you're changing several internal key parts of atlas. it's not that i'm against it, but you should also keep in mind that there are several people building applications with atlas and it' won't be a lot of fun to find out that v1.0 is out and that everything is completly different (when compared with the ctps!).

thanks.


I think the reason that we're not giving out a date is that there isn't a specific date chosen yet. What we will have is public previews of the new 1.0 Atlas (soon, but I'm not surehow soon). We'll also have a comprehensive document that describes the changes between the older Atlas CTPs and the new Atlas 1.0 CTPs so you can scan through it and identify any changes that you will have to make.

Thanks,

Eilon

PostBacks are not working

Help!

As soon as I change to EnablePartialRendering="true" so that I can get all the fancy Atlas functionality the buttons stop working. Weird thing is that the project was working but now it does not. I've reinstalled Atlas and I still have the same issue.

The aspx code is:

<

atlas:ScriptManagerid="s1"EnablePartialRendering="true"runat="server"/>

<

asp:PanelID=panel1runat=serverHeight="140px"Width="475px">

<

atlas:UpdatePanelID="p1"runat="server">

<

ContentTemplate><asp:LabelID="lblHello"runat=serverVisible=false>Hello World</asp:Label><asp:ButtonID="Button1"runat="server"Text="Button 1"Visible=falseOnClick="Button_Click"/><asp:ButtonID="Button2"runat="server"Text="Button 2"Visible=trueOnClick="Button_Click"/>

</

ContentTemplate>

<

Triggers>

<

atlas:ControlEventTriggerControlID="ImageButton1"EventName="Click"/>

</

Triggers>

</

atlas:UpdatePanel>

</

asp:Panel><asp:ImageButtonID="ImageButton1"runat="server"ImageUrl="~/images/but_New.gif"OnClick="ImageButton1_Click"/>

The cs code is:

protectedvoid ImageButton1_Click(object sender,ImageClickEventArgs e)

{

this.lblHello.Visible = !this.lblHello.Visible;

}

protectedvoid Button_Click(object sender,EventArgs e)

{

this.Button1.Visible = !this.Button1.Visible;this.Button2.Visible = !this.Button2.Visible;

}

And the web.config file has the following (I didn't change anything on this)

<

controls>

<

addnamespace="Microsoft.Web.UI"assembly="Microsoft.Web.Atlas"tagPrefix="atlas"/>

<

addnamespace="Microsoft.Web.UI.Controls"assembly="Microsoft.Web.Atlas"tagPrefix="atlas"/>

</

controls>

Thanks!

Hey!

try this in your Page_Load:

Page.ClientScript.GetPostBackEventReference(

new System.Web.UI.PostBackOptions(this.(control that is not posting back));

I had the same problem, and this line did the trick. This generates the _doPostBack function everytime the page loads. I'm not sure why is this necesary...

hope this works for you!


hello.

i've copied your excerpt and it looks like it's running ok here...


OK so this is REALLY weird.

My atlas post backs don't work when the page fist loads, but once I refresh the page everything works great. I've compared the webpage source code for page when it works and when it doesn't and the source code is identical.

Anyone have any ideas.

Help!!!


I'm having the same problem. Does anyone have a solution?

Wednesday, March 21, 2012

Problem In Update Panel...

Hello,

I have a Set of Buttons which are to be showed in some condition. Means Some of My buttons I want to show if User has given some conditions. So I put them in an Update Panel. Now if any button in this panel is having Server.Transfer method then it shows error and do not allow to leave that Update Panel. How to overcome this problem ? (Response.Redirect works but I have to use Server.Transfer.)

Why you need to use Server.Transfer? Can you postback to a different page?

My 2 cents about Atlashttp://alpascual.com/blog/al/archive/2006/07/18/215.aspx

http://alpascual.com/blog/al/archive/2006/07/13/207.aspx

Cheers

Al