| You must Sign In to use this message board. |
|
| | Msgs 1 to 25 of 41 (Total in Forum: 41) (Refresh) | FirstPrevNext |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
Hello, I used your excellent code of the MessageBox, but I had small problem. Is there a way to manually change the location of the control? Basicly, I'm asking the same question as rchokler asked you on 12:24 3 Apr '06
Please respond with an answer if you can.
Thanks.
-- modified at 11:00 Thursday 7th June, 2007
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
Hi...
I use Master pages and try to use the update, wish were posted ealier:
gPopupMask = document.getElementById("<%=popupMask.ClientID %>");
But it has not changed anything - nothing still happens when run my page...??
|
| Sign In·View Thread·PermaLink | 2.33/5 (3 votes) |
|
|
|
 |
|
 |
I changed the code, it works but the msg box does not changed ,, I don't know why ,, it does it response to the buttons click or any thing
!!!
|
| Sign In·View Thread·PermaLink | 1.67/5 (3 votes) |
|
|
|
 |
|
 |
Great Control!! It works fine in the VS 2005 development environment. However after publishing the WEB site and run from the browser Mbox appearance changes. Entire contentplaceholder becomes Gray color and Mbox popup background changes to black. Do you know the reason for this?
Rohan Chandratileka
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
Yeeow, i found the reason, the problem are the form layers, you must to put messagebox over the most external layer, if you have your form statements next to bodies statements the most external one of the layers will be all the page, and you will see this bad behavior.
try changing the position of your <form> and </form> statements send them to inside the code page, all you can...
Keep Learning...
ff
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Your server side message box control is just what I was looking for! Easy to use and to configure.
But when I use my own defined user control on the page it doesn't work anymore. It shows the box but it doesn't raise the click event as defined in btn1_Click....
Any ideas or suggestions!?!?
jan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
this is a prefect control, but it cannot run with master page. The reason is system cannot get the handle of the Element Client ID in Master page.
so just a little update of javascript, this control can run in Master page correctly, a example as follow:
original code:
gPopupMask = document.getElementById(ControlName + "_popupMask");
update code: gPopupMask = document.getElementById("<%=popupMask.ClientID %>");
like this, update every sentence in source code, u can get a perfect control worked with Master page.
eric
|
| Sign In·View Thread·PermaLink | 2.40/5 (4 votes) |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
I'm sorry but I'm new at this. Do you have any sample code or a project where this was used in a master page that I could look at? Thanks, Warren
|
| Sign In·View Thread·PermaLink | 2.00/5 (3 votes) |
|
|
|
 |
|
 |
Not working for me, even after making changes with respect to master pages.
Can you please suggest solution?
Thanks in advance
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
As this solution doesn't work for me (and i don't know why, cause i do not know javascript) i digged more, what took me over 2 days (i'm new to asp.net though) and i do not really know, why haven't yet anybody posted solution i'm going to give here, because when you'll see it, you certainly will agree with me, that all those mvp's and other great guys had to know it.
So to make this great control work in all common *.aspx and in the ones bounded to some ContentPlaceHolder: - open the behind cs code file - find the one of the overloaded Show methods that invokes ShowPowWin script - it gives the script three parameters - third is the ID of the control to show, but ID is the ID of control in the ascx file, but we need ID of the control in the entire page which differs f.e. when mbox is placed in ContentPlaceHolder (you can see this when you open source of page shown in your IE or sth) - change this.ID to this.ClientID, which is generated on fly by framework when it is generating the page for the request
That's all ! I specially made account here, to write this and save some other people hours of searching and frustration - because if i didn't find this solution i would certainly depracete it and never use anymore.
Good Luck
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
Hello, I used your wonderful code of the Server Side MessageBox, but I had small problem. I couldn’t find how to relocate the Message window, it always appear in the middle of the page, Can I change the location ?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Looks like a great control, however it does not seem to work if placed in a contentplaceholder.
|
| Sign In·View Thread·PermaLink | 3.67/5 (3 votes) |
|
|
|
 |
|
 |
As this solution doesn't work for me (and i don't know why, cause i do not know javascript) i digged more, what took me over 2 days (i'm new to asp.net though) and i do not really know, why haven't yet anybody posted solution i'm going to give here, because when you'll see it, you certainly will agree with me, that all those mvp's and other great guys had to know it.
So to make this great control work in all common *.aspx and in the ones bounded to some ContentPlaceHolder: - open the behind cs code file - find the one of the overloaded Show methods that invokes ShowPowWin script - it gives the script three parameters - third is the ID of the control to show, but ID is the ID of control in the ascx file, but we need ID of the control in the entire page which differs f.e. when mbox is placed in ContentPlaceHolder (you can see this when you open source of page shown in your IE or sth) - change this.ID to this.ClientID, which is generated on fly by framework when it is generating the page for the request
That's all ! I specially made account here, to write this and save some other people hours of searching and frustration - because if i didn't find this solution i would certainly depracete it and never use anymore.
Good Luck
|
| Sign In·View Thread·PermaLink | 5.00/5 (2 votes) |
|
|
|
 |
|
 |
Yes it does - try the following (you need to find the container details) its to do with name mangling with javascript
Create copy of ascx and add 'ctlName' to Public Overloads Sub Show Page.ClientScript.RegisterStartupScript( _ GetType(String), "mb", "<script>showPopWinServerSide('" + Caption + "', null,'" + ctlName + "_" + Me.ID + "');</script>")
In Master - add <script type="text/javascript" src="subModalServerSide/subModalServerSide.js"></script>
then the div containing AccNet:MessBoxChild ID="ctlMessageBoxChild" runat="server" EnableTheming=true>
add to aspx containing Master <%@ Reference Control="~/frmModalPopupServerSideCopy.ascx" %>
in code behind of aspx Private oSubModal As New subModalServerSide_frmModalPopupServerSideChildDetail
oSubModal = CType(Master.FindControl("ctlMessageBoxChild"), subModalServerSide_frmModalPopupServerSideChildDetail)
ErrorHandler(ErrorMessage, Nothing, "Cancel", Nothing)
Private Sub ErrorHandler( _ ByVal sErrorMessage As String, _ ByVal sOk As String, ByVal sCancel As String, ByVal sRetry As String) '----------------------------------------- ' displays error messge ' - uses subModal server side '----------------------------------------- oSubModal.Show( _ sErrorMessage, clsApp.MB_ErrorGeneral, _ sOk, sCancel, sRetry, _ subModalServerSide_frmModalPopupServerSideChildDetail.MessageBoxIcons.Information, _ subModalServerSide_frmModalPopupServerSideChildDetail.MessageBoxStyle.Beige, _ clsNamingContainer.GetMasterPageContainerString(Page, subModalSuffix, sContainerName)) End Sub
Then finally clsNamingContainer contains Public Shared Function GetMasterPageContainerString( _ ByVal oPage As Page, ByVal sSuffix As String, _ ByVal sContainerName As String) As String '----------------------------------------- ' returns string of NamingContainer for MasterPage '----------------------------------------- Dim sString As String = "" Dim phContent As ContentPlaceHolder
'----------------------------------------- ' get container '----------------------------------------- phContent = CType(oPage.Master.FindControl("MainContent"), ContentPlaceHolder)
'----------------------------------------- ' extract ID '----------------------------------------- If Trim(sSuffix) = "" Then sString = phContent.ClientID.ToString Else sString = phContent.ClientID.ToString & "_" & sSuffix End If
'----------------------------------------- ' only need MasterID ' - ctl00_ctlMessageBoxChild & not ctl00_MainContent_ctlMessageBoxChild '----------------------------------------- sString = sString.Replace("_" & sContainerName, "")
'----------------------------------------- ' return '----------------------------------------- Return sString End Function
Bit of messing about but should work
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
 |
This is one of the BEST controls in codeproject. Thanks a lot. It works great and no more problems with popup blockers..
I am waiting for improvements...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Excellent article – also works as a neat little demo of how to link up events to a control in C# Keep up the good work!!
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |