.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Loading UserControl doesnot render panel properly with rounded corners

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :ASP.Net
Hello folks,I am doing the following steps of code to load a childusercontrol into a parent and load it as a popup.Please help me correct my code below as I am not able to get the rounded corners.Below is my aspx page:<%@ Register Src="~/MessageUC.ascx" TagName="MessageUC" TagPrefix="Ctrl" %> <head runat="server"> <title></title> <link href="Styles/PopUp.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <Ctrl:MessageUC ID="MsgModal" runat="server" /> <asp:Button ID="btnFireOkMessage" runat="server" Text="Show" Height="44px" Width="225px" /> </form> </body> And here is aspx.vbProtected Sub btnFireOkMessage_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnFireOkMessage.Click Dim str As String = "Header" Dim strBody As String = "Body" MsgModal.Show(TestModalPopup.MessageUC.MessageType.Success, str, strBody, 200, 500) End Sub MessageUC.ascx<asp:LinkButton ID="LinkButtonTargetCon

View Complete Post

More Related Resource Links

Cannot develop the rounded corners for panel

Hello All, I m trying develop rounded corners for panel. I have gone through this post and did exactly as below:.modalPopup { background-color:transparent; padding:1em 6px; } .modalPopup2 { background-color:#ffffdd; width:270px; vertical-align :top; } .modalBackground { background-color:gray; filter:alpha(opacity=70); opacity:0.7; } Here is the aspx code: <form id="form1" runat="server"> <asp:ScriptManager runat="server" ID="ScriptmanagerTest"></asp:ScriptManager> <div> <asp:LinkButton ID="lnkButton" runat="server">Show Modal popup</asp:LinkButton> <br /> <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" style="display:none;"> <asp:Panel ID="Panel2" runat="server" Width="334px" CssClass="modalPopup2"> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br /> <asp:Button ID="btnCancel" runat="server" Text="Cancel" /> <asp:Button ID="btnOK" runat="s

UserControl like asp:Panel


Is it possible to write own User Control with functionality like asp:Panel?

Debugger not loading properly and exiting


I am attempting to debug my Visual Studio 2005 project. I have Internet explorer 8 and it's running on IIS.

When I hit the "debug" button, a new Internet Explorer browser window opens and my ASP VB .NET application loads normally. However, Visual studio returns back to regular editting mode and I can hit the "debug" button again. No break points hit but my web page still runs and loads normally.

The Output screen use to show Web.Server(exit 0) but now it doesn't show anything.

Any help would be greatly appreciated, I've been trying to find a solution for a while...


Image or ImageButton rounded corners


Hiiiii Coders,

I just want to make corners of my asp.net image or imagebutton rounded. How can i do so?  

How to set Panel.Zindex value though XAML code if any of the Grid/UserControl children having the fo

Hi, I have a Grid with 10 buttons. If any of these buttons has focus then I want to set the Panel.Zindex = 999 for the Grid. How to do this in XAML code?Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This will help other members to find the solution easily.

Having problem with drawing rounded corners with borders using RoundedCornersExtender control

Hi, I have created panel using below syntax <asp:Panel style="z-index:4;top:270px;left:270px;width:320px;height:200px;position:absolute;"  Enabled="True" CssClass="Panel" TabIndex="4" Visible="True" runat="server" ToolTip="" BackColor="" BorderStyle="NotSet" BorderWidth="0px">  <div style="clear:both"></div></asp:Panel> and added rounded corner extened control using <cc1:RoundedCornersExtender Corners="All" runat="server" TargetControlID="panel4" BorderColor="Black" Enabled="True" Radius="10"></cc1:RoundedCornersExtender>Issue: At run time   there is  a gap between border and corners. I am using doctype of this" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >"If i changed the doc type to below "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" ><html xmlns="http://www.w3.org/1999/xhtml" >" its working fine.Is there any solution for this with out changing the doc type?Advanced thanks for your help.Thanks,Charles  

Nested UserControl Render Order

I have a custom control created in codebehind, and I have in the same control an ordinary asp.net button. Like this: protected void Page_Load(object sender, EventArgs e) { } private void MyTable() { Table table = new Table(); TableRow row = new TableRow(); TableCell cell = new TableCell(); CheckBox check = new CheckBox(); check.ID = "theId"; check.Text = "My Check"; check.AutoPostBack = true; cell.Controls.Add(check); row.Cells.Add(cell); table.Rows.Add(row); this.Controls.Add(table); } protected override void CreateChildControls() { MyTable(); base.CreateChildControls(); } And in the asmx something like this:<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyUserControl.ascx.cs" Inherits="Tester.MyUserControl" %> <asp:Button ID="Button1" runat="server" Text="Button" /> ok... now. When I render my control it looks like: [BUTTON] [ ] My Check But I really need that the button render after the checkbox. Any idea how can I do that?

People Picker Render Error in Document Information Panel

I created a Content Type and added 3 columns.  One of those columns is a People Picker type column. When I open the Content Type by going to NEW -> MyContentType in a document library in SharePoint it opens in Microsoft Word but the People Picker control does not render correctly in the Document Information Panel. There is no error - just a display of a broken control. Is there a fix?

Tab panel inside usercontrol cut off in ie6 and ie7

Hi,can anyone shed me some light on this issue.I use the tabpanel and place it in a usercontrol. but the text in the tab header are cut off when opened in IE6 and IE7. in mozilla this is working properly. i am loading this usercontrol in a webpart so i can add it in any page in my site.can someone help me. Thanks

How to make background-image of table or panel Rounded ?

Hi, I have taken background-image of a Table and Panel, that image's corner is rectangula. How can i make its corners Rounded ? I searched some online resources, images were made rounded, how to make make background-image rounded on the fly ? 

Panel Corners



I am not able to get this fixed. I am not able to develop rounded corners.

.success .validation{   
    margin: 10px 0px;
    background-repeat: no-repeat;
    background-position: 10px center;
    background-color: #ffffff;    
.success a {
    float: right;
  /* padding-top:5px;*/

  vertical-align :top;  



User Control with JQuery doesnot work inside update panel


Hi All,

I created a .NET user control to work as a DropdownCheckbox and added Jquery to give the sliding and hide effects. The code is as below:

 <script language="javascript" type="text/javascript">
        var showRegionWindow = function (ev) {
            var pos = $("#lnkChangeRegion").offset();
            var width = 230;
            var height = 55;
            //$("#changeRegionPanel").css({ "left": +((pos.left) - 215) + "px", "top": height + 16 + "px" });.
            document.getElementById("lnkChangeRegion").style.display = 'none';

        var hideRegionWindow = function (ev) {
            var textVal = "";

Rounded Corners on Web Parts


Hi all

I am having some trouble adding rounded corners to my web parts.

I can add rounded corners to three of the corners on the web part chrome by editing the following CSS:

/* Top Left Corner */

.ms-WPHeaderTd {

	background: #04a204 url('/images/tl.gif') no-repeat left top;


/* Top Right Corner */

.ms-WPHeaderTdMenu {

	background: #04a204 url('/images/tr.gif') no-repeat right top;


/* Bottom Left Corner */

.s4-wpcell-plain {

	background: #04a204 url('/images/bl.gif') no-repeat left bottom;


It is the bottom that I am having problems with, I cannot find a way of adding an image to the bottom right corner. CSS3 would be able to do this, but support is thin and SharePoint 2010 doesn't seem to like it in IE9 anyway. I've also found very little online in relation to this problem.

Any help or suggestions would be greatly appreciated.

Many thanks


Exception loading page with Ajax enabled WebPart/UserControl ?



The AjaxControl Toolkit has been configured onto our SharePoint 2007 Server, however when we bring up a page with a WebPart+UserControl, we get the following exception:


[4300] Exception Loading CPI RPI WebPart: System.Web.HttpCompileException: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a112516a\152cc84\App_Web_cpirpicalc.ascx.57bd6353.duu1hbuu.0.cs(138): error CS0433: The type 'AjaxControlToolkit.ToolkitScriptManager' exists in both 'c:\Windows\assembly\GAC_MSIL\AjaxControlToolkit\3.5.40412.0__28f01b0e84b6d53e\AjaxControlToolkit.dll' and 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a112516a\152cc84\assembly\dl3\4bec602a\25bcac65_13efca01\AjaxControlToolkit.DLL' 


The userControl+Ajax Portion of the WebPart works correctly when brought up under ASP.NET but not SharePoint.  

Is there anyway to force this to go to the correct version?




Issue with dynamic usercontrol loading when using ParseControl() method in VS2008


In the process of migrating an old VS2003 web app to VS2008, I'm running into this issue and haven't been able to find a resolution. 

Sample code:

"Default.aspx" has a PlaceHolder(ToolHeader).  In the Page_Load(), we dynamically load a user control passing in the virtual path to a helper method [public Control ParseUserControl(string virtualPath)].  This reads the content from the physical path, returns a Control from ParseControl() method. 

 I immediately get the following error when I open the default.aspx page in browser.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'DynamicUC.UcControl'.

Source Error:

 Line 1:  <%@ Control AutoEventWireup="true" CodeBehind="UcControl.ascx.cs" Inherits="DynamicUC.UcControl"  %>

Can't figure out why it can't load the type.  Namespaces are looking right.   I try removing the Inherits="DynamicUC.UcControl" attribut

CSS not loading properly.


Css file is on the Root in the Content/CSS/Site.css folder. Now I am using T4MVC.tt for strongly typed names like

<link href="<%: Links.Content.CSS.Site_css %>" rel="stylesheet" type="text/css" />

Page is not rendering CSS at all. But if I remove "" on href like

<link href=<%: Links.Content.CSS.Site_css %> rel="stylesheet" type="text/css" />

everything is working fine but I don't get any Intelli for T4MVC which I don't want.

Any help on this.


HTML does not render properly


This is my setup.

I get some HTML from an OData service. When I try to HtmlDecode the HTML it won't! It simply outputs stuff like:

<p style="font-size:11px;">&lt;br&gt;
Vivek W. (ESB): No!......That&#39;s

Why can't I Decode this HTML and render it properly ?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend