0

我有一个问题,我的布局似乎很古怪,我不知道为什么。这是我的布局:

<form id="form1" runat="server">
<input type="hidden" id="hidIsStrip" value="false" runat="server" />
<ajaxToolkit:ToolkitScriptManager ID="sm1" runat="server" EnablePageMethods="true" />
<div class="mainContentHolder">
    <h1>New IKS Server Credentials</h1>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="rbfileByHolder" style="float:left; width:350px;" runat="server">
                <label>Sort By</label>
                <span><asp:RadioButton class="aspRBs" GroupName="rbfileByNameOrID" ID="rbMyFiles" Text="My Files"
                    runat="server" Checked="true" AutoPostBack="True" 
                    OnCheckedChanged="rbMyFiles_CheckedChanged" /></span>
                <span><asp:RadioButton class="aspRBs" GroupName="rbfileByNameOrID" id="rbByFileID"
                    Text="By File ID" runat="server" AutoPostBack="true"
                    oncheckedchanged="rbByFileID_CheckedChanged" /></span>
                <span><asp:RadioButton class="aspRBs" GroupName="rbfileByNameOrID" id="rbByFileName"
                    Text="By File Name" runat="server" AutoPostBack="true"
                    oncheckedchanged="rbByFileName_CheckedChanged" /></span>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <label>File</label>
            <asp:DropDownList runat="server" ID="ddlCaseFiles" DataSourceID="dsCaseFiles" 
                DataTextField="Display" DataValueField="FileID" OnPreRender="ddl_PreRender" 
                Height="20px" Width="400px" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="ddlCaseFiles" Display="Dynamic" ErrorMessage="*" 
                Title="Date Must Be Selected" />

            <br />
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="rbByFileName" EventName="CheckedChanged" />
            <asp:AsyncPostBackTrigger ControlID="rbByFileID" EventName="CheckedChanged" />
            <asp:AsyncPostBackTrigger ControlID="rbMyFiles" EventName="CheckedChanged" />
        </Triggers>
    </asp:UpdatePanel>
    <label>Date Active</label>
    <input type="text" class="datepicker halfsizedInputs" id="dateActive" runat="server" />
    <asp:RequiredFieldValidator ErrorMessage="*" ControlToValidate="dateActive" Display="Dynamic" runat="server" Title="Date Must Be Selected" />
    <asp:RegularExpressionValidator ErrorMessage="*" ControlToValidate="dateActive" display="Dynamic" runat="server" ValidationExpression="^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$" ToolTip="Date Format: YYYY/MM/DD" />
    <label class="inlineLbl">Length of Purchase</label>
    <input type="text" class="halfsizedInputs" id="txtLengthPurchase" runat="server" />
    <br />
    <label>Username</label>
    <input class="halfsizedInputs" type="text" id="txtUserName" runat="server" />
    <label class="inlineLbl">Password</label>
    <input class="halfsizedInputs" type="text" id="txtPassword" runat="server" />
    <br />
    <label>IP/Domain</label>
    <input class="halfsizedInputs" type="text" id="txtIPDomain" runat="server" />
    <label class="inlineLbl">Port</label>
    <input class="halfsizedInputs" type="text" id="txtPort" runat="server" />
    <br />
    <label>DES</label>
    <input type="text" id="txtDES" runat="server" style="width:430px;" />
    <br />
    <label>Location being used</label>
    <asp:DropDownList runat="server" style="margin-right:10px; width:400px;" ID="ddlLocationUsed" DataSourceID="dsIKSLocationTypes" DataTextField="LocationType" DataValueField="IKSLocationBeingUsedID" OnPreRender="ddl_PreRender" />
    <a style="width:15px;" class="lnkNewPopUpStyles" id="NewLocationUsedType">New</a>
    <br />
    <label>Website</label>
    <input class="halfsizedInputs" type="text" id="txtWebsite" runat="server" />
    <label class="inlineLbl">Task ID Purchased</label>
    <input class="halfsizedInputs" type="text" id="txtTaskIDPurchased" runat="server" />
    <br />
    <label>Amount Paid</label>
    <input class="halfsizedInputs" type="text" id="txtAmountPaid" runat="server" />
    <asp:RangeValidator class="validation" ErrorMessage="*" ControlToValidate="txtAmountPaid" Display="Dynamic" runat="server" MinimumValue="0.01" Title="Amount must be positive" MaximumValue="100000000" Type="Currency" />
    <label class="inlineLbl">Payment Method</label>
    <asp:DropDownList ID="ddlPaymentType" Width="157px" runat="server" DataSourceID="dsPaymentTypes" DataTextField="PaymentType" DataValueField="PaymentTypeID" OnPreRender="ddl_PreRender" class="halfsizedInputs" />        
    <br />
    <label>Comments</label>
    <asp:TextBox ID="txtComment" runat="server" Height="70px" MaxLength="250" TextMode="MultiLine" Width="435px"></asp:TextBox>
    <asp:RequiredFieldValidator ErrorMessage="*" ControlToValidate="txtComment" Display="Dynamic" runat="server" Title="Comments required" />
    <br />

    <asp:Button ID="saveCredentials" Style="float: right; margin-right: 25px;" runat="server" Text="Save New Credentials" OnClick="saveCredentials_Click" OnClientClick="return checkValidation();" />
        <input id="btnAddFilesToServerCredentials" style="float:right;" runat="server" type="button" value="Add Photos" />

    <br />
    <div>
        <label>Attached Files</label>
        <div id="attachedFiles" runat="server"></div>
    </div><br />
    <asp:Label ID="lblIKSMessages" runat="server" Font-Bold="True" ForeColor="DarkRed"></asp:Label><br />
    <input id="retvalA" runat="server" type="hidden" />
    <input id="retvalB" runat="server" type="hidden" />
</div>
<div id="newddlLocation" style="display:none;">
    <label class="inlineLbl">Location</label>        
    <input type="text" id="txtNewLocation" />
</div>
<asp:HiddenField ID="hidCaseFileID" runat="server" />
<asp:SqlDataSource ID="dsIKSLocationTypes" runat="server" ConnectionString="<%$ ConnectionStrings:OSCIDConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="p_Elements_GetIKSLocationTypes" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
<asp:SqlDataSource ID="dsCaseFilesReverse" runat="server" ConnectionString="<%$ ConnectionStrings:OSCIDConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="p_CaseFiles_ListActiveCaseFilesReverse" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
<asp:SqlDataSource ID="dsCaseFiles" runat="server" ConnectionString="<%$ ConnectionStrings:OSCIDConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="p_CaseFiles_ListActiveCaseFiles" SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:SessionParameter Name="InvestigatorID" SessionField="InvestigatorID" />
    </SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsPaymentTypes" runat="server" ConnectionString="<%$ ConnectionStrings:OSCIDConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="Select PaymentTypeID, PaymentType FROM ElementsPaymentTypes"></asp:SqlDataSource>
<asp:SqlDataSource ID="dsMyCaseFiles" runat="server" ConnectionString="<%$ ConnectionStrings:OSCIDConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="p_CaseFiles_ListActiveCaseFilesAssignedTo" SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:SessionParameter Name="InvestigatorID" SessionField="InvestigatorID" />
        <asp:SessionParameter Name="AssignedTo" SessionField="InvestigatorID" />
    </SelectParameters>
</asp:SqlDataSource>
</form>

我遇到的问题是下拉列表旁边的标签“文件”不会与下拉列表显示在同一行。并且当必需字段被激活时。红星出现在标签“文件”和下拉列表之间,而不是在下拉列表之后。此外,当必填字段被激活时,标签“活动日期”往往会向上跳一行。所以它在下拉列表旁边结束。有什么建议么?我试过让列表更小。

4

1 回答 1

0

似乎只是<br />在标签修复一切之前添加。

于 2012-09-17T14:33:11.210 回答