0

I am new in ASP.NET, and I have a website which I opened it by MS Visual 2010. The problem is when I try to select a control element I can not because it seems behind ContentPlaceHolder. See the image below, what can I do!

enter image description here

Here is the code of the page:

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<title>Job Seekers : Search Job in Oman</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

    <asp:Table runat="server" Width="800" style="direction: ltr" Visible="False">
    <asp:TableRow VerticalAlign="Top">

        <asp:TableCell ID="cell_register" runat="server"></asp:TableCell>
        <asp:TableCell RowSpan="2" VerticalAlign="Top" ColumnSpan="2" CssClass="tdcloud2">            
        <h2>Last News</h2>
        <div id="news" runat="server"></div>
 </asp:TableCell>
         <asp:TableCell RowSpan="2" VerticalAlign="Top" Width="200" CssClass="tdcloud">
            <h2>Site Services</h2>

            <hr /><br />
            <img src="Images/bullet.png" />  <a href="AvailableJobs.aspx">Available Jobs</a><br />
            <img src="Images/bullet.png" />  <a href="CompaniesProfiles.aspx">Compnaies Profiles</a><br />
            <img src="Images/bullet.png" />  <a href="AddCompany.aspx">Register Company</a>
         </asp:TableCell>

    </asp:TableRow>

    <asp:TableRow VerticalAlign="Top">
            <asp:TableCell ID="cell_login" runat="server" Width="200" CssClass="tdcloud">
            <h2>Login</h2>
            <hr />
            <asp:Label ID="lbl_error" runat="server" Text="" CssClass="error"></asp:Label>
            <br />
            <asp:Label ID="lbl_email" runat="server" Text="Email:" CssClass="label"></asp:Label>
            <asp:TextBox ID="txt_email" runat="server" CssClass="input"></asp:TextBox>
            <br />
            <asp:Label ID="lbl_password" runat="server" Text="Password:" CssClass="label" ></asp:Label>
            <asp:TextBox ID="txt_password" runat="server" TextMode="Password" CssClass="input"></asp:TextBox>
            <br />
            <asp:CheckBox ID="chk_company" runat="server" /><asp:Label ID="lbl_company" runat="server" Text="Company" CssClass="" ></asp:Label>
            <br /><asp:Button ID="btn_login" runat="server" Text="Login" 
        onclick="btn_login_Click" />
        <br /><br />
            <a href="Forget.aspx">Forget Password ?</a>
            <br />
            <a href="Register.aspx">Regsiter</a>
            <hr />
        </asp:TableCell>

        <asp:TableCell ID="cell_logged" runat="server" Visible="false" CssClass="tdcloud">
            <h2>Account</h2>
            <hr />
            <img src="Images/users.png" />
            <div><span class="bold"><%=Session["email"] %><%=Session["company"] %></span> </div>
            <br />
            <%
                if (Session["company"] != null)
                {
                    %>
                    <div><a href="CompInfo.aspx">Company Information</a></div>
                    <div><a href="SeekersApplications.aspx">Seekers Applications</a></div>
                    <div><a href="ChangePasswordCompany.aspx">Change Password</a></div>
                    <div><a href="AddJob.aspx">Add Job</a></div>

                        <%
                }
                else
                {
                    %>
                                <div><a href="PersInfo.aspx">Personal Information</a></div>
                    <div><a href="JobApplications.aspx">Job Applications</a></div>
                    <div><a href="ChangePasswordSeeker.aspx">Change Password</a></div>
                        <div><a href="UploadCv.aspx">Upload CV</a></div>
                    <%
                }
            %>

            <br />
            <asp:Button ID="btn_SinOut" runat="server" Text="Sign Out" 
        onclick="btn_SinOut_Click" />
        <asp:Label runat="server" Text="Are you sure you want to sign out?" id="lbl_note" Visible="false"></asp:Label>
        <asp:Button ID="btn_yes" runat="server" Text="yes" 
        onclick="yes" Visible="false" />
        <asp:Button ID="btn_no" runat="server" Text="no" 
        onclick="no" Visible="false" />
        <hr />
        </asp:TableCell>    </asp:TableRow>
    <asp:TableRow VerticalAlign="Top">

        <asp:TableCell><h2>Advertisements</h2><a href="http://nawras.om"><img src="Images/nawras.jpg" width="80" height="80" /></a>  <a href="http://www.oxy.com"><img src="Images/oxy.jpg" width="80" height="80" /></a>  <a href="http://www.pdo.co.om/"><img src="Images/pdo.gif" width="80" height="80" /></a></asp:TableCell>
        <asp:TableCell><center><h2>New Jobs</h2></center>
        <div id="jobs" runat="server"></div>
        </asp:TableCell>
        <asp:TableCell><center><h2>Jobs ends soon</h2></center><div id="jobsends" runat="server"></div></asp:TableCell>
        <asp:TableCell><center><h2>Contact</h2></center><center><a href="Contact.aspx"><img title="Contact Me" width="150" src="Images/contact.jpg" /></a></center></asp:TableCell>

    </asp:TableRow>


    </asp:Table>
    </asp:Content>
4

4 回答 4

1

如果您想选择一个控件并且无法从您的设计器控件持有者中选择该控件,在设计模式下,单击 F4 并在属性框的顶部,您可以在表单/页面中找到所有控件的列表,如下所列一个列表框。但是如果你想选择控件的一部分,例如:登录控件的登录按钮,将鼠标悬停在控件上,然后单击控件任务(一点>符号)并单击转换为模板,此操作会爆炸控件并且您可以根据需要选择它的每个部分。

于 2012-07-28T16:50:24.660 回答
0

我认为您正在master page尝试从内容页面访问母版页的控件。如果是这种情况,请转到母版页并访问那里的控件。否则在源视图而不是设计视图中查找控件。

于 2012-07-28T10:28:58.447 回答
0

希望有所帮助: 无法选择表格单元格内的项目

于 2012-07-30T17:13:36.117 回答
0

只是简单的解决方案 - >从表格单元格中剪切控制并粘贴到表格外。-> 执行你想要的操作 -> 然后再次剪切控件并再次粘贴到上一个单元格中。

它会起作用的。

于 2019-02-12T01:44:37.377 回答