使用母版页时验证程序无法正常工作

时间:2014-09-26 12:28:21

标签: validation validationsummary

我有一个表格,我有一些验证器。问题是;当我不使用母版页时,它们都可以正常工作,但是当我需要使用母版页时,它们就无法工作。

我没有得到问题所在。

以下是我的主页

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="gauravkumar.master.cs"
Inherits="gauravkumar" %>

<%@ Register Src="Header.ascx" TagName="Header" TagPrefix="uc1" %>
<!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 runat="server">
<title>Untitled Page</title>
<link href="../css/mystyle1.css" rel="stylesheet" type="text/css" />
<style type="text/css">
    .style4
    {
        height: 10px;
    }
</style>
</head>
<body>
<form id="form1" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="880" align="center">
    <tr>
        <td style="width: 301px; font-family: Verdana; font-size: small; color: #FFFFFF;
            font-weight: bold;" rowspan="4" align="center" valign="top">
            Assisted By&nbsp;&nbsp;<img src="../images/jica_logo.png" />
        </td>
        <td align="right" class="style1">
            &nbsp; &nbsp; &nbsp; &nbsp;
            <asp:Label ID="lblUser" runat="server" CssClass="calibiriLogout" Font-Bold="True"
                Width="105px"></asp:Label>
            &nbsp; &nbsp;&nbsp;
            <img src="../images/user.gif" />
        </td>
        <td valign="middle">
            &nbsp;&nbsp;
        </td>
        <td valign="middle">
            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" Font-Bold="True"
                Font-Names="Verdana" Font-Overline="False" Font-Strikeout="False" Font-Underline="True"
                ForeColor="GhostWhite" OnClick="lbLogout_Click" Font-Size="X-Small">Logout</asp:LinkButton>
        </td>
    </tr>
    <tr>
        <td align="right" class="style1">
            &nbsp;
        </td>
        <td valign="middle">
            &nbsp;
        </td>
        <td valign="middle">
            &nbsp;
        </td>
    </tr>
    <tr>
        <td rowspan="1" align="center" valign="top" style="font-family: Times New Roman;
            color: #FFFFFF;" class="style1">
            <h2>
                Management Information System</h2>
        </td>
        <td>
            &nbsp;
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td align="left" rowspan="1" valign="top" class="style2">
        </td>
        <td class="style4">
        </td>
        <td class="style4">
        </td>
    </tr>
    <tr>
        <td style="width: 301px" align="left" valign="top">
            <asp:Panel ID="Panel2" BorderWidth="1" runat="server" CssClass="paneltreeview" Height="500px"
                Width="230px">
                <asp:TreeView ID="TreeView2" runat="server" DataSourceID="XmlDataSource1" ExpandDepth="1"
                    ImageSet="XPFileExplorer" NodeIndent="15" ShowLines="True" OnSelectedNodeChanged="TreeView2_SelectedNodeChanged"
                    OnTreeNodeDataBound="TreeView2_TreeNodeDataBound">
                    <ParentNodeStyle Font-Bold="False" />
                    <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
                    <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
                        VerticalPadding="0px" />
                    <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
                        NodeSpacing="0px" VerticalPadding="2px" />
                    <DataBindings>
                        <asp:TreeNodeBinding DataMember="submenu" ShowCheckBox="False" TextField="submenuname" />
                        <asp:TreeNodeBinding DataMember="submenu1" NavigateUrlField="url" TextField="submenu1name"
                            ImageUrlField="picurl1" />
                        <asp:TreeNodeBinding DataMember="submenu2" NavigateUrlField="url" TextField="submenu2name"
                            ImageUrlField="picurl" />
                    </DataBindings>
                </asp:TreeView>
                <asp:XmlDataSource ID="XmlDataSource1" runat="server"></asp:XmlDataSource>
            </asp:Panel>
        </td>
        <td colspan="3" valign="top">
           <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </td>
    </tr>
    <tr>
        <td align="center" colspan="4" style="height: 60px">

        </td>
    </tr>
    <tr>
        <td colspan="4" align="center">
        </td>
    </tr>
    <tr>
        <td align="center" colspan="4">
        </td>
    </tr>
</table>
</form>

0 个答案:

没有答案