|
|
Comments and Discussions
|
|
 |

|
Good message box. I really like it.
|
|
|
|
|

|
Thanks for the control
For all they have problems with FireFox here the fix :
In the Mbox.ascx add this
style="background-color: #D4D0C8;"
to the MainTable
|
|
|
|

|
Great Solution !! But tel me where I can place control if I want to use it . my page use master page . I tried adding I diff placed but its not working . Please tell me the right place ?
|
|
|
|

|
how to grey out background?
|
|
|
|

|
does not work in all other browsers then IE...the background is black...
|
|
|
|

|
It all works great for me except for one thing. After the button handler executes the browser does not reflect the visual changes I made in the event. For example, I hide a panel control that is visible before the message box. After the message box, the panel is still visible even though I set its Visible property to false. Also, when I try to show a hidden control in the button handler, it does not show...
I wish it worked for me because it looks really good...
|
|
|
|

|
It all works great for me except for one thing. After the button handler executes the browser does not reflect the visual changes I made in the event. For example, I hide a panel control that is visible before the message box. After the message box, the panel is still visible even though I set its Visible property to false. Also, when I try to show a hidden control in the button handler, it does not show...
I wish it worked for me because it looks reallyy good...
|
|
|
|

|
Work with net.framework 3.5??
sorry with my english
|
|
|
|
|

|
The background color of Mbox become Black in FF, and there are two pink lines up and down the screen.
I updated codes as below:
<table runat="server" id="MainTable" name="MainTable" style="border-width: 0px; border-collapse: collapse; border-color: #EAEBEF; ">
width="100%" height="100%">
<tr style="background-color: #EAEBEF; border-width: 0px; border-color: #EAEBEF; border-collapse: collapse;">
<td style="width: 62px; height: 96px;border-width: 0px;border-color: #EAEBEF; " valign="middle" align="center">
<asp:image id="iIcon" runat="server" xmlns:asp="#unknown"></asp:image></td>
<td style="height: 96px;border-width: 0px;border-color: #EAEBEF; " valign="middle" align="left" colspan="3">
<asp:label id="lblMessage" runat="server" width="100%" height="100%" forecolor="#1F336B" xmlns:asp="#unknown">
Font-Names="Arial" Font-Size="Smaller"></asp:label></td>
</tr>
<tr align="center" style="background-color: #EAEBEF; border-width: 0px; border-color: #EAEBEF;<br mode=" hold=" /> border-collapse: collapse; ">
<td style="width: 62px; height: 26px;border-width: 0px;border-color: #EAEBEF; ">
</td>
<td valign="bottom" align="right" style="height: 26px;border-width: 0px;border-color: #EAEBEF; ">
<asp:button id="btn1" runat="server" text="Button" cssclass="button" onclick="btn1_Click" xmlns:asp="#unknown">
Width="60px"></asp:button><asp:button id="btn2" runat="server" text="Button" cssclass="button" xmlns:asp="#unknown">
OnClick="btn2_Click" Width="60px"></asp:button><asp:button id="btn3" runat="server" xmlns:asp="#unknown">
Text="Button" OnClick="btn3_Click" Width="60px"></asp:button></td>
</tr>
</table>
but the border of the table is still BLACK.
modified on Thursday, July 17, 2008 10:24 AM
|
|
|
|

|
I had tried that solution, my background colour is still black.
Please advice.
Smile
chankl78
|
|
|
|

|
Tesekkür ederim çok iyi bir çözüm sagladin bana.
|
|
|
|

|
Great control! but why does the session expires when i use the control on my child page?
|
|
|
|
|

|
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
|
|
|
|

|
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...??
|
|
|
|

|
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
!!!
|
|
|
|

|
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
|
|
|
|

|
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
|
|
|
|

|
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
|
|
|
|

|
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
|
|
|
|

|
Thanks, thanks and againg thanks.
it's exacly what that I looked for.
|
|
|
|

|
Thank you very much...
|
|
|
|

|
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
|
|
|
|

|
Not working for me, even after making changes with respect to master pages.
Can you please suggest solution?
Thanks in advance
|
|
|
|

|
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
|
|
|
|

|
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 ?
|
|
|
|

|
Looks like a great control, however it does not seem to work if placed in a contentplaceholder.
|
|
|
|

|
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
|
|
|
|

|
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
|
|
|
|

|
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...
|
|
|
|

|
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!!
|
|
|
|

|
The source files you have provided is irking with some problems for me. They are as follows
1.) c:\inetpub\wwwroot\MessageBox\Default.aspx.cs(11): Expected class, delegate, enum, interface, or struct
This is coming at "public partial class _Default : System.Web.UI.Page"
Error at partial
2.) System.Web.UI.WebControls.WebParts also has some probs. What is the reference I have to take inorder to make this namespace work
thnks
|
|
|
|

|
Hi my friend, if you get error on the keyword "partial" your problem is so simple and so big. you have problem with your version of .NET FW Because, as you could see in the article, this component is written for ASP.NET 2.0, so you need .NET FW 2.0
if it still does not work, please feel free to ask and search for help.
http://blogs.yazgelistir.com/kivanc/
|
|
|
|

|
This Sample doesnt work for me. I get tons of Warnings and Erros when try to compile. Can you give me Tips, if i tell what happens in my Environment?
Regards
Jan Waiz
Jan Waiz
|
|
|
|

|
Did you download the source files and look at them to see what is differnt about your code?
"Art doesn't want to be familiar. It wants to astonish us. Or, in some cases, to enrage us. It wants to move us. To touch us. Not accommodate us, make us comfortable." -- Jamake Highwater
Toasty0.com
My Grandkids
|
|
|
|

|
That would be great.
Thanks!
|
|
|
|

|
It would be also nice to have an ability to make changes through CSS rules (defined by user) and not only use 2 built in color schemas.
|
|
|
|

|
Yeas, you are right.
But you can edit the code, Mbox.ascx.cs file and the InitializeStyle method. Also you may add a new enum-item to MessageBoxStyle.
if you add good styles to messagebox, please mail them to me. I will update this article and ad your styles.
http://blogs.yazgelistir.com/kivanc/
|
|
|
|

|
I have tried a number of div popup window solutions, most do not cope with a dropdown list showing through in IE.
The normal technique is the put an iframe shim below the window div, as this is the only object that is opaque to a dropdown list.
|
|
|
|

|
Hi there,
check the code, you will see that, it also hides comboboxes.(Dropdownlists).
As everyone knows, <Select> html element has always the highest z-index. So, there is only oneway to hide them: Make them invisible..!!!
Check the code..
http://blogs.yazgelistir.com/kivanc/
|
|
|
|

|
How can I modify the z-order so that that MBox will display properly and ComboBox(Dropdownlists) will appear at the back of the MBox?
|
|
|
|

|
Eline sağlık sevgili Kıvanç,
Seninle gurur duyuyoruz... Makalelerinin artarak devam etmesini diliyorum.
Mesut Koşucu
|
|
|
|

|
Yavrum saol vatana millete hayırlı olsun. Çok güzel olmuş eline koluna sağlık.
|
|
|
|

|
Maybe it's just me, but Server-side might not be a good term. Server-side Message Box means (to me, at least) that the MessageBox is shown on the ASP.NET server, which is clearly not the case.
|
|
|
|

|
In terms of web programming, it means it's events are handled on the server, and not simply by the browser client.
Michael J. Collins
Web Application Programmer
|
|
|
|

|
His terminology is correct.
|
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
A web (modal) messagebox without popup.
| Type | Article |
| Licence | |
| First Posted | 19 Sep 2005 |
| Views | 132,170 |
| Bookmarked | 104 times |
|
|