Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Wednesday, March 28, 2012

Modal popup and postback

Hello,
I'm using a modal popup which contains a OkButton which should normally do a postback to save the option value.
But the postback is not done, either in a regular form (not in an update panel) nor an atlas form, simply nothing is done.
Is it a way to do that? The description of the control says just to do postback like normal ones.
You can see this bug here:http://www.wdagent.com, clic on the messaging on the right menu the on "options" (you can see that the page is not reloaded and the updateprogress loading is not shown).

The code is the following :
[code}
<act:ModalPopupExtender ID="OptionsPopUpMaker" runat="server">
<act:ModalPopupProperties TargetControlID="OptionsButton" PopupControlID="Options" BackgroundCssClass="modalBackground" DropShadow="false" OkControlID="ValidateOptionsButton" CancelControlID="CancelOptionsButton" />
</act:ModalPopupExtender>

<div style="display: none;">
<asp:Panel ID="Options" runat="server" Height="80px" Width="300px" CssClass="modalPopup">
<asp:RadioButton ID="OptionsFriendsBig" runat="server" GroupName="Options" Text="Afficher les contacts détaillés" /><br />
<asp:RadioButton ID="OptionsFriendsSmall" runat="server" GroupName="Options" Text="Afficher les contacts simples" /><br /><br />
<div style="text-align: right;"><asp:Button ID="ValidateOptionsButton" runat="server" Text="Save preferences" OnClick="SetFriendsOptions" /><asp:Button ID="CancelOptionsButton" runat="server" Text="Cancel" /></div>
</asp:Panel>
</div
I noticed a huge number of bugs in this toolkit (i wasn't even able to use a control bug free!) like :
- The title of the page disapear when clicking on expand/collapse link of a collapsible panel (i rewrited the javascript for this) and disable the partial rendering of the page.
- The textboxwatermark disable the partial rendering of the page (i don't know how it is possible but it is...).

Thanks for your helpSorryn the "options" is in the "friends" tab
chech this out, it could give you an idea or a way to solve it..
what you really could do is:
do a javascript call like:
__doPostBack('ValidateOptionsButton', '');
on the save button

but you will notice that your controls (OptionsFriendsSmall)will not hold the values for the postback
so you will have to assign them o another hidden control before the postback

so to test the postback your modalpopupextender property onOkScript will look like:

OnOkScript="__doPostBack('ValidateOptionsButton', '')"

if this works but doenst post back the values of theOptionsFriendsSmall create a hidden field and ajava script function that saves the value to the hidden field first and then does the postsback call.

for example:
OnOkScript="savevalue(seletedvalue)"

and inside thesavevalue function do the__doPostBack



Please also have a look at the following threads for ModalPopup background/fixes:http://forums.asp.net/thread/1277351.aspx,http://forums.asp.net/thread/1287520.aspx.


thanks :)

modal popup error - cant set focus to control

Hi

My webpage contains a modal popup. I am using the atlas release - the june ctp i think

I'm getting an error on my webpage if I view it in Internet Explorer 6. This is the error

Can't move focus to the control because it's invisible not enabled or of a type that does not accept focus

I get this error on page load. Everything works fine but naturally i dont like the error message.

I would really appreciate it if you could take a look and shed some light on it for me

http://84.92.22.217/UChoose/frames.aspx

thanks a lot

andrea

I checked your website and did not see any error message. Everything works fine.
No issues here with IE6 or Firefox 1.5.0.8.

Modal Popup Extender Flash

I'm using the MPE to display a panel that contains a gridview.
It works fine, except that when the page loads (whether it be IE or Mozilla), the panel containing the gridview is visible for a split second and then the MPE hides it. It's kind of confusing to a user - does anybody know how to fix this?

Surround the panel with a div as such:

<div id="divModalPopup" style="display:none"> <asp:Panel ID="pnlModalPopup" runat="server" Height="50px" Width="667px" BackColor="White"><!-- Some content --> </asp:Panel></div>

Thanks,
Chad

Monday, March 26, 2012

Modal Popup Extender Repositionmode is not working correctly

Hello,

I have a modal popup that contains a form with a height that exceeds the screen size. When i try to scroll down the modal popup repositions itself so that i never can reach the bottom content. I have tried downloading the latest Ajax Control toolkit release (1.11119) and implemented the RepositionMode = "None" attribute but it still doesn't work. Anyone have any suggestions?

Thanks,

Tony

Hi Tcha143,

As far as I know, it is a known issue. We suggest that you should post it toCodePlex. We will mark it as "resolved" so our community members won't waste their time to reproduce your issues. Thanks for understanding.

Best regards,

Jonathan

modal popup problem. blank textboxes

hi, im having problems here. i have a modal popup that when user clicks the edit button, the modal popup will appear and it contains the textboxes for editing.what's od is that the textboxes are all blank and i when i checked my codes not using modal popup, it is doing fine. i have these codes below:

1<asp:Button ID="btnEditPer" runat="server" Text="OK" />2 <asp:Button ID="btnCancel" runat="server" Text="Cancel" />3 </asp:Panel>45 <cc1:ModalPopupExtender ID="mpEditPer" runat="server"6 TargetControlID="lbEditPer"7 PopupControlID="Panel1"8 BackgroundCssClass="modalBackground"9 DropShadow="true"10 CancelControlID="btnCancel" >11 </cc1:ModalPopupExtender>

and then in the code behind:

1if (!IsPostBack)2 {3string id = Request.QueryString["EmployeeID"];4 Employee emp = Employee.ShowEmployeeByID(id);56this.lblFirstName.Text = emp.FirstName;7this.lblMiddleName.Text = emp.MiddleName;8this.lblLastName.Text = emp.LastName;9this.lblBirthdate.Text = emp.BirthDate.ToString();10this.lblBirthplace.Text = emp.BirthPlace;11this.lblNationality.Text = emp.Nationality;12this.lblReligion.Text = emp.ReligionID;13this.lblGender.Text = emp.Gender;14this.lblCivilStatus.Text = emp.CivilStatus;15this.lblHeight.Text = emp.Height;16this.lblWeight.Text = emp.Weight;17this.lblHairColor.Text = emp.HairColor;18this.lblEyeColor.Text = emp.EyeColor;1920//load data in textboxes and lists21this.txtFirstName.Text = emp.FirstName;22//other codes goes here23 }
i just wanted to test if i can get the value of the first name, but no luck. hope u can help me on this one. thanks in advance.

Is this code in the server click handler of the modalpopup targetcontrol button? The click event on that is cancelled and the modal popup only shows the popup on the client side. Could you possibly provide some more details on the setup?

Modal Popup Scrollable

I have a grid view inside a modal popup, here is my question: how can i make modal popup scrollable (keep visible) when gridview contains too many rows? Right now all the rows beyond page are remain invisible even I scrolled the scrollbar on the side? Thanks i advance.Try to put that grid inside div with css

overflow: auto


You will need to fix the size of the div too!

Saturday, March 24, 2012

Modalpop larger than browser window

I am having a problem with a modal popup that is larger than the browser window. The modal popup contains a gridview, and can be large. I cannot figure out a way to scroll using the browswers scrollbars. I just noticed the Modal popup on this ASP.NET site to submit source code, and thought that would be perfect. Can anyone help me get started implementing a modal such as that?

Thanks

you can set the width & height of the Panel that you are using for popup.

Eg. <asp:Panel id="panelpopup" runat="Server" CSSClass="modalPopup" Width="600px" Height="400px" />


Thanks for the reply.

It appears I am still having a few issues. One is that regardless of what sizes I specify, if results in the gridview don't have enough room, it will automatically make it big enough to fit it in, but the ModalPoppup doesn't grow with it. It seems like the size of the panel would grow with the data inside of it, but for some reason the data will flow out of the ModalPopup. Also, if it returns too much information, or if a user makes their browser window smaller than the size of the popup, they cannot scroll to see it all. I can scroll the page below the popup, but the popup always recenters itself.


Does anyone have a solution for this?

Wednesday, March 21, 2012

modalpopup & user control question

Hi all,

I hope all of you are doing well!Big Smile I have an interesting situation that I wanted to get some input on.

I have a ascx usercontrol that contains about a dozen textbox and dropdown controls inside an updatepanel. It also has a few buttons that fire server side events, all contained and handled in the code behind page for the usercontrol. This usercontrol resides on a host aspx page inside another updatepanel control. Everything works fine thus far.

Now, what I would like to do is dynamically popup the usercontrol inside a modalpopup when the user clicks on a button on the host aspx page. The user would then enter the data for the dozen or so fields on the popped up usercontrol, hit update, which would invoke the server side code inside the code behind of the usercontrol and finally close the modalpopup.

Is this possible? Some insight on how I can do this would be great. Some links to code samples would be even more awesome.

Thanks so much!

Hi,

Here is a sample made according to your requirements:

1. UserControl

<%@. Control Language="C#" ClassName="WebUserControl" %><script runat="server"> protected void Button1_Click(object sender, EventArgs e) { Label1.Text = DateTime.Now.ToString(); success = true; } // this variable is used to determine if the modal popup should close public bool success = false;</script><asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </ContentTemplate></asp:UpdatePanel> 

2. Page

<%@. Page Language="C#" %><%@. Register src="http://pics.10026.com/?src=WebUserControl.ascx" TagName="WebUserControl" TagPrefix="uc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void Page_Load(object sender, EventArgs e) { this.PreRender += new EventHandler(default_aspx_PreRender); } void default_aspx_PreRender(object sender, EventArgs e) { if (WebUserControl1.success) UpdatePanel1.Update(); }</script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> </div> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate>    <asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px"> <uc1:WebUserControl ID="WebUserControl1" runat="server" /> </asp:Panel> <asp:Button ID="Button1" runat="server" Text="Show" /> <ajaxToolkit:ModalPopupExtender PopupControlID="Panel1" ID="ModalPopupExtender1" runat="server" TargetControlID="Button1"> </ajaxToolkit:ModalPopupExtender> </ContentTemplate> </asp:UpdatePanel>   </form></body></html>

Hope this helps.


Thanks. This worked perfectly!!