Geeks With Blogs

News

Microsoft MVP


DZone MVB


Moderator at CodeASP.NET


Quiz Master







free counters
Free counters
Added on January 19,2012


Follow Me @vmsdurano

A bit About Me



Disclaimer
The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers. Nor does it represent the opinion of my dog, because I don’t have one.


Vinz' Blog (ProudMonkey) "Code, Beer and Music ~ my way of being a programmer"

If you were using the customized MessageBox, ConfirmBox and FrameBox controls and wanted to modify the look and feel of the these controls then you should be happy because the new version of the ProudMonkey controls provide some properties that you can set to customize the modal controls including the header, buttons, body background color, header fonts etc.

You can download the new version here:
ProudMonkey Controls Version 2

The MessageBox provides the following properties:

HeaderImageUrl - This property sets the ImageUrl to be used as the background in the MessageBox header. Note that the image should be 2 x 28 in size because this image will be repeated horizontally.
HeaderBackgroundColor - This property sets the background color of the MessageBox header. You can use this property if you don't want to use the default header background of the MessageBox or if you don't want to set the HeaderImageUrl property.
HeaderTextColor - This property sets the text fore color of the MessageBox header.
HeaderTextFont - This property sets the text font of the MessageBox header.
BodyBackgroundColor - This property sets the background color of the MessageBox body where the actual text is displayed.
BodyTextColor - This property sets the text fore color of the actual content dispalyed in the body.
BodyTextFont - This property sets the text font of the actual content displayed in the body
OKButtonImageUrl - This property sets the ImageUrl to be used as the background image for the OK button.
CloseButtonImageUrl - This property sets the ImageUrl to be used as the background image for the Close button.

Note that if you don't set any of those properties the default styles will be automatically applied.

Sample Usage:

<cc1:MessageBox ID="MessageBox1" runat="server" 
                HeaderImageUrl="Images/header.png"
                HeaderTextColor="White"
                HeaderTextFont="Arial Black"
                BodyBackgroundColor="#E1E5F0"
                BodyTextFont="Tahoma"
                BodyTextColor="#263F75"  
                OKButtonImageUrl="Images/btnOK.jpg"
                CloseButtonImageUrl="Images/btnClose.jpg" />

Actual Output:

 

The ConfirmBox also provides the same properties just like what the MessageBox does. The only additional properties are:

YesButtonImageUrl - This property sets the ImageUrl to be used as the background image for the Yes button.
NoButtonImageUrl - This property sets the ImageUrl to be used as the background image for the No button.

Again if you don't set any of those properties in the ConfirmBox control, the default styles will be automatically applied.

Sample Usage:

<cc1:ConfirmBox ID="ConfirmBox1" runat="server"
                YesButtonImageUrl="Images/btnYes.jpg"
                NoButtonImageUrl="Images/btnNo.jpg"
                CloseButtonImageUrl="Images/btnClose.jpg" 
                HeaderImageUrl="Images/header.png"
                HeaderTextColor="White"
                HeaderTextFont="Arial Black" />

Actual Output:




The FrameBox has the following properties:

HeaderImageUrl - This property sets the ImageUrl to be used as the background in the FrameBox header. Note that the image should be 2 x 28 in size because this image will be repeated horizontally.
HeaderBackgroundColor - This property sets the background color of the FrameBox header.
HeaderTextColor - This property sets the text fore color of the MessageBox header.
HeaderTextFont - This property sets the text font of the MessageBox header.
CloseButtonImageUrl - This property sets the ImageUrl to be used as the background image for the Close button.

Sample Usage:

<cc1:FrameBox ID="FrameBox1" runat="server"
              HeaderImageUrl="Images/header.png"
              HeaderTextColor="White"
              HeaderTextFont="Arial Black"
              CloseButtonImageUrl="Images/btnClose.jpg" />

Actual Output:


 

That's it! I hope someone find this post useful!

Technorati Tags: ,
Posted on Monday, May 2, 2011 2:47 PM ASP.NET , ProudMonkey Controls | Back to top


Comments on this post: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
NO COMMENT
Left by SURESH on May 26, 2011 12:58 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
thanx a lot this is wonderful
Left by qq on Jun 24, 2011 3:32 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
Thanks for these wonderful tools! 1 question ... for some reason the title text ("Error", "Confirmation", etc.) is coming up right-justified in the header bar, and the close button is on top of it ... any ideas? Thanks again!
Left by JMS on Jul 16, 2011 4:07 AM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
The control seems to be clearing all sessions when using IE (after deployment), can you look into this
Left by Bola on Aug 04, 2011 4:20 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
@Bola,

I don't think the control has something to do with clearing the sessions.
Left by Vinz on Aug 04, 2011 4:23 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
Thank you for your quick response. Let me give you the details of my application.

When a user logs on successfully to the system, some information are saved in session. if the session is empty, the user will automatically be redirected to the login page.

Everything works fine until i deployed it to my company's intranet and this only happens in IE. once try to navigate away from the page that i used the control, it throws me back to the login page (session count=0)

I debugged the app, and immediately commented out the control, the application works well.

I have been trying to find ways around this as this control is already an integral of my application and i dont want to remove it :(

Please help
Left by Bola on Aug 04, 2011 7:03 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
Are you using the FrameBox Control? You may also refer this threads below for some useful posts:

http://forums.asp.net/t/1466311.aspx/1
http://forums.asp.net/t/1210514.aspx/1/10
Left by Vinz on Aug 04, 2011 8:17 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
Thank you once again, i have gone through the links. tried so many options but when i used IE Developer, i found out that the control creates an image which i cannot locate on the page. see below. I will appreciate if you can help me figure this out


Broken Image
SRC http://10.40.18.54/LMS/
Actual Width unknown Actual Height unknown
Adjusted Width 0px Adjusted Height 0px
Alt text [Empty Alt Value]
Title text [Empty Title Value]
File Size unknown bytes
DYNSRC [No DYNSRC]
LOWSRC [No LOWSRC]
Left by Bola on Aug 05, 2011 11:41 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
HELLO,
I created a new project to test this, without any other control or code behind, just blank page with only the Messagebox and ConfirmBox.
I then 'Inspect Element' using chrome and noticed the broken image is actually coming from the Messagebox.
This error disappears when you remove the messagebox and only use the ConfirmBox.
I will appreciate you help investigate

Thanks for the good work.
Left by Bola on Aug 06, 2011 1:15 AM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
@Bola,

What image you are referring? can you give me the file name?

Anyway..I'll look into it when time permits.. I'm tied up with deadlines at this moment till a couple of weeks.
Left by Vinz on Aug 08, 2011 1:54 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
Thanks for the response, the image is not identified..it only points to the page name (for example default.aspx). I'm sure this can be reproduced with little effort. Looking forward to your investigation.

Best Regards
Left by Bola on Aug 09, 2011 6:28 AM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
im having a hard time using this control. when i will run it using firefox the messagebox is 100% working but when i use IE it functioning but theres a little bit problem, I cant click the message box!!!!

http://lh4.ggpht.com/IIF1_KVFj6NxaM_W0rpvg3F9TUEaCXYOM_BQBtWnszzCw8cT5bIKM5GL10gGHMFKjGJUFA=s138
Left by troyiee on Aug 12, 2011 10:10 AM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
what I mean is its working with IE, but when the message box is being shown I cant click it!!!

thankz hopefully you can help me w/ this
Left by troyiee on Aug 12, 2011 10:14 AM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal`
Requesting Gravatar...
Will this messagebox would even work for Framework 3.5?
Left by Alan on Aug 29, 2011 10:33 AM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
@Alan,

There's an equivalent control for 3.5 here:
http://geekswithblogs.net/dotNETvinz/archive/2010/11/02/a-customize-messagebox-confirmbox-and-framebox-control-for-asp.net.aspx

But I haven't included the updates yet to customize the control.
Left by Vinz on Aug 30, 2011 2:48 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
How do I invoke the msgbox from vb

thank you

bob buehler
Left by bob on May 20, 2012 7:33 AM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
Sorry, I don't know if it is the correct section.
I tried your good product. The only thing, it's not working very well if you put it in a ascx control. That give me a rendering error, even with the register 'proudmonkey' statement. Do you have a solution?
Left by Pierre Schippers on May 26, 2012 9:21 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
i got this msg when i load page..(i used AjaxControlToolkit in my page)

Could not load file or assembly 'AjaxControlToolkit, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

plz any body help me
Left by sai chen on Jun 12, 2012 1:25 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
@saichen,

You'll have to use the correct version of the AjaxControlToolkit for the compatibility of the control. Please download the necessary dll's here: http://proudmonkeycontrols.codeplex.com/
Left by Vinz on Jun 12, 2012 6:54 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
Is it possible to disable Yes button in confirm box, i need it for some scenarios.

Regards
Ravi
Left by Ravi on Jun 13, 2012 12:15 PM

# re: ProudMonkey Controls for ASP.NET 4.0 - Customizing the Modal
Requesting Gravatar...
@Ravi,

It doesn't make sense if you'll going to display a confirmation message without the YES option. perhaps you'll have to use the MessageBox control instead?
Left by Vinz on Jun 13, 2012 3:48 PM

comments powered by Disqus

Copyright © Vincent Maverick Durano | Powered by: GeeksWithBlogs.net