在ASP.Net中使用Panel的RoundedCornerExtender [英] RoundedCornerExtender with Panel in ASP.Net

查看:58
本文介绍了在ASP.Net中使用Panel的RoundedCornerExtender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用AJAX RoundedCornerExtender和< asp:Panel>控制,通过将targetcontrolID设置为面板的id。我甚至设置了面板的高度和宽度但仍然无法在面板中找到任何更改,面板甚至不可见。以下是我的代码片段

I am using the AJAX RoundedCornerExtender with the <asp:Panel> control, by setting the targetcontrolID to the id of the panel.I've even set the height and the width of the panel but still I could'nt find any change in panel the panel is not even visible. Following is my code snippet

%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Userconsole.aspx.cs" Inherits="WebApplication1.TAP_User_Console.Userconsole" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!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">
<head id="Head1"  runat="server">
    <title>User Console</title>
    <link rel="Stylesheet" href="../Styles/Site.css" />
</head>
<body>
<form id="form1"  runat="server">
    <div id="Login" style="margin-removed 600px">
         <asp:Button ID="btLogout" runat="server" Text="Logout" BackColor="#009933" 

             Font-Bold="True" ForeColor="Black" />
    </div> 
    <div id="Userheader1">
        <asp:ToolkitScriptManager ID="userconsolemngr" runat="server">
        <asp:Panel ID="Userheader1pane" runat="server" Height="72px" Width="100%">
        <center>
        <br />
        <table width="100%">
            <tr>
                <td align="left">
                    <asp:Button ID="btnNewfolder" runat="server" Text="New Folder" 

                        width="115px" Font-Bold="True" />
                </td>
                <td align="left">
                    <asp:Button ID="btnNewor" runat="server" Text="New OR" Font-Bold="True" 

                        Width="115px" />
                </td>
                <td align="left" style="margin-removed 40px">
                    <asp:Button ID="btnNewlibrary" runat="server" Text="New Library" 

                        width="115px" Font-Bold="True" />
                </td>
                <td>
                    <asp:Button ID="btnConfig" runat="server" Text="Config Settings" 

                        BackColor="#0099FF" Font-Bold="True" ForeColor="White" Width="144px" />            
                </td>
                <td>
                    <asp:Button ID="btnTestmgmt" runat="server" Text="Test mgmt" 

                        BackColor="#0099FF" Font-Bold="True" ForeColor="White" Width="144px" />            
                </td>
             </tr>
        </table>
        <br />
        </center>
        
        <asp:RoundedCornersExtender ID="Userheadercorner" runat="server" TargetControlID="Userheader1pane" Radius="6">
        </div>





任何人都可以帮助我找到我出错的地方,因为我可以从一些论坛上看到RoundedCornerExtender仅适用于面板。



提前谢谢



Can anyone help me to find where I've gone wrong, because I can see from some forums that RoundedCornerExtender works fine with panel alone.

Thanks in advance

推荐答案

请添加脚本管理器,如果它是个人表格,或者如果它是在特定主表下,将脚本管理器添加到主表格。我认为你的是单一表格
Please Add Script Manager if it is Indivual Form or if its taken under the Specific Master add Script manager to Master Form.I think yours is Single Form Right

我在面板上发现了一些东西并且有圆角。确保您已经说明了面板的高度和宽度属性。然后我们必须在RoundedCornerExtender控件中使用BorderColor属性,并且还必须在Corners属性和radius中指定。简单地说你要玩边框和半径
I found something and atlast rounded corner works on my panel. Be sure that you've stated the height and width property of the panel. Then we have to use BorderColor property in RoundedCornerExtender control and also have to specify in Corners property and also radius. In simple you've to play with the border and radius


在asp.net中,使用ajax很容易实现圆角到面板,试试下面的例子



In asp.net its easy to implement rounded corner to panels using ajax, try the following example

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server"></script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </ajaxToolkit:ToolkitScriptManager>
    </div>
    <asp:Panel ID="Panel1" runat="server" BackColor="AppWorkspace" Height="188px" Width="271px">
    </asp:Panel>
    <ajaxToolkit:RoundedCornersExtender ID="Panel1_RoundedCornersExtender"

        runat="server" Enabled="True" TargetControlID="Panel1" Radius="15">
    </ajaxToolkit:RoundedCornersExtender>
    </form>
</body>
</html>


这篇关于在ASP.Net中使用Panel的RoundedCornerExtender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆