简体   繁体   English

我发布应用程序后,asp.net:textboxes消失了

[英]asp.net: textboxes disappear after i publish application

When i compile my web app and run it in the browser, it looks good and the textboxes appear; 当我编译我的网络应用程序并在浏览器中运行它时,它看起来很好,文本框出现; however, after i publish it, the textboxes are not visible anymore. 但是,在我发布之后,文本框不再可见了。 i believe it is a CSS error because the textboxes still exist. 我认为这是一个CSS错误,因为文本框仍然存在。 i am able to type in them; 我可以输入它们; however it does not show the white background of the textbox, it simply blends into the background. 但它没有显示文本框的白色背景,它只是混合到背景中。 what am i doing wrong? 我究竟做错了什么? here's my code: 这是我的代码:

<%@ Page EnableEventValidation="true" Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="EnterData.DataEntry.WebForm1" %>


<!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></title>


    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js" type="text/javascript"></script>


    <link href="../niceforms/niceforms-default.css" rel="stylesheet" type="text/css" />
    <script src="../niceforms/niceforms.js" type="text/javascript"></script>

    <!--The below is to make the calendar look nice!-->
    <link href="../jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .list-problems {
        height:600px !important;
        width:400px !important;
        display:inline-block;
    }
    </style>



    <script>
        jQuery(function($) {
        //$("#occurrence_dateTextBox").mask("99/99/9999");
        //$("#<%= report_dateTextBox.ClientID %>").mask("99/99/9999");
        $("#<%= occurrence_dateTextBox.ClientID %>").datepicker();
        $("#<%= report_dateTextBox.ClientID %>").datepicker();
        //$(".datepicker").datepicker(); 

    });



    function getselectedproblems() {
        ob = document.getElementById('lstProblems');
        var problemlist = '';
        for (var i = 0; i < ob.options.length; i++) {
            if (ob.options[i].selected) {
                //alert(ob.options[i].value);
                problemlist = problemlist + ';' + ob.options[i].value; //Do something useful here
            }
        }
        document.getElementById("HiddenProblemList").value=problemlist;
    }

    </script>



</head>
<body><div id="container">
    <form id="form1" runat="server" class="niceform">

        <fieldset>

        <legend>Section A</legend>

        <dl>

            <dt><label for="occurrence_dateTextBox" >Occurrence Date:</label></dt>
            <dd><asp:TextBox ID="occurrence_dateTextBox" runat="server" size="50"/></dd>
        </dl>

        <dl>

            <dt><label for="report_dateTextBox">Report Date:</label></dt>
            <dd><asp:TextBox ID="report_dateTextBox" runat="server" size="50"/></dd>
        </dl>


        <dl>

            <dt><label for="spec_idTextBox">Specimen ID:</label></dt>
            <dd><asp:TextBox ID="spec_idTextBox" runat="server" size="50"/></dd>
        </dl>

        <dl>

            <dt><label for="batch_idTextBox">Batch ID:</label></dt>
            <dd><asp:TextBox ID="batch_idTextBox" runat="server" size="50"/></dd>
        </dl>

        <dl>

            <dt><label for="report_byTextBox">Report By:</label></dt>
            <dd><asp:TextBox ID="report_byTextBox" runat="server" size="50"/></dd>
        </dl>

        <dl>

            <dt><label for="identified_byTextBox">Identified ID:</label></dt>
            <dd><asp:TextBox ID="identified_byTextBox" runat="server" size="50"/></dd>
        </dl>

        </fieldset>

        <fieldset>
        <legend>Section B</legend>



        <dl>
            <dt><label for="lstProblems">Problems List:</label></dt>
            <dd>
                <asp:ListBox ID="lstProblems" runat="server" SelectionMode="Multiple" 
                    CssClass="list-problems" DataSourceID="SqlDataSource2" DataTextField="Column1" 
                    DataValueField="Column1"></asp:ListBox>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:LOM %>" 
                    SelectCommand="select '[' + category + ']' + ' ' + description from tblProblemList">
                </asp:SqlDataSource>
            </dd>

        </dl>  





        </fieldset>

        <fieldset>
        <legend>Section C</legend>
        <dl>

            <dt><label for="section_c_issue_error_identified_byTextBox">Issue/Error Identified By:</label></dt>
            <dd><asp:TextBox ID="section_c_issue_error_identified_byTextBox" runat="server" size="50"/></dd>


        </dl>

        <dl>

            <dt><label for="section_c_commentsTextBox">Comments:</label></dt>
            <dd><asp:TextBox ID="section_c_commentsTextBox" runat="server" size="50"/></dd>


        </dl>       

        </fieldset>

        <fieldset>
        <legend>Section D</legend>
        <dl>

            <dt><label for="section_d_investigationTextBox">Investigation:</label></dt>
            <dd><asp:TextBox ID="section_d_investigationTextBox" runat="server" size="50"/></dd>


        </dl>

        </fieldset>

        <fieldset>
        <legend>Section E</legend>
        <dl>

            <dt><label for="section_e_corrective_actionTextBox">Corrective Action:</label></dt>
            <dd><asp:TextBox ID="section_e_corrective_actionTextBox" runat="server" height="200" TextMode="MultiLine" size="50"/></dd>


        </dl>


        </fieldset>

        <fieldset>
        <legend>Section F</legend>
        <dl>

            <dt><label for="section_f_commentsTextBox">Comments:</label></dt>
            <dd><asp:TextBox ID="section_f_commentsTextBox" runat="server" size="50"/></dd>


        </dl>

        </fieldset>

        <fieldset>
        <legend>Pre-Analytical</legend>


        <dl>
            <dt><label for="CheckBox1">PreAnalytical?</label></dt>
            <dd> <asp:CheckBox ID="CheckBox1" runat="server" CausesValidation="false"
                            Visible="true" AutoPostBack="true" OnCheckChanged="CheckBox1_CheckedChanged"/></dd>
        </dl>
        <dl>

            <dt><label for="prePracticeCodeTextBox">Practice Code:</label></dt>
            <dd><asp:TextBox ID="prePracticeCodeTextBox" runat="server" Visible="false"/></dd>


        </dl>

        <dl>

            <dt><label for="preContactTextBox1">Contact:</label></dt>

            <dd><asp:TextBox ID="preContactTextBox" runat="server" Visible="false"/></dd>


        </dl>

        </fieldset>


        <input id="HiddenProblemList" type="hidden" runat="server" />
        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="SubmitData"  OnClientClick="getselectedproblems()"/>


    </form>


</div></body>
</html>

here is how i published my application: 这是我发布我的申请的方式:

http://imageshack.us/photo/my-images/15/75458540.png/ http://imageshack.us/photo/my-images/15/75458540.png/

here is the CSS file: 这是CSS文件:

/*Defaults Styling*/
body {font:12px/17px Arial, Helvetica, sans-serif; color:#333; background:#ccc; padding:40px 20px 20px 20px;}
fieldset {background:#f2f2e6; padding:10px; border:1px solid #fff; border-color:#fff #666661 #666661 #fff; margin-bottom:36px; width:600px;}
input, textarea, select {font:12px/12px Arial, Helvetica, sans-serif; padding:0;}
fieldset.action {background:#9da2a6; border-color:#e5e5e5 #797c80 #797c80 #e5e5e5; margin-top:-20px;}
legend {background:#bfbf30; color:#fff; font:17px/21px Calibri, Arial, Helvetica, sans-serif; padding:0 10px; margin:-26px 0 0 -11px; font-weight:bold; border:1px solid #fff; border-color:#e5e5c3 #505014 #505014 #e5e5c3;}
label {font-size:11px; font-weight:bold; color:#666;}
label.opt {font-weight:normal;}
dl {clear:both;}
dt {float:left; text-align:right; width:90px; line-height:25px; margin:0 10px 10px 0;}
dd {float:left; width:475px; line-height:25px; margin:0 0 10px 0;}
#footer {font-size:11px;}

#container {width:700px; margin:0 auto;}

/*##########################################
Script: Niceforms 2.0
Theme: StandardBlue
Author: Lucian Slatineanu
URL: http://www.emblematiq.com/
##########################################*/

/*Text inputs*/
.NFText {border:none; vertical-align:middle; font:12px/15px Arial, Helvetica, sans-serif; background:none;}
.NFTextCenter {height:15px; background:url(img/input.png) repeat-x 0 0; padding:3px 0; margin:0; float:left; line-height:15px;}
.NFTextLeft, .NFTextRight {width:7px; height:21px; vertical-align:middle; float:left;}
.NFTextLeft {background:url(img/input-left.png) no-repeat 0 0;}
.NFTextRight {background:url(img/input-right.png) no-repeat 0 0;}
/*Radio*/
.NFRadio {cursor:pointer; position:absolute; display:block; width:13px; height:13px; border:1px solid transparent; background:url(img/radio.png) no-repeat 0 0; z-index:2;}
/*Checkbox*/
.NFCheck {cursor:pointer; position:absolute; width:12px; height:12px; border:1px solid transparent; background:url(img/checkbox.png) no-repeat 0 0; z-index:2;}
/*Buttons*/
.NFButton {width:auto; height:26px; color:#fff; padding:0 2px; background:url(img/button.png) repeat-x 0 0; cursor:pointer; border:none; font:10px/26px Tahoma, Arial, Helvetica, sans-serif; font-weight:bold; text-transform:uppercase; letter-spacing:1px; vertical-align:middle;}
.NFButtonLeft, .NFButtonRight {width:6px; height:26px; vertical-align:middle;}
.NFButtonLeft {background:url(img/button-left.png) no-repeat 0 0;}
.NFButtonRight {background:url(img/button-right.png) no-repeat 0 0;}
/*Textareas*/
.NFTextarea {border:none; background:none; font:12px/12px Arial, Helvetica, sans-serif; margin:0;}
.NFTextareaTop, .NFTextareaBottom {height:5px; clear:both; float:none; padding-right:10px;}
.NFTextareaTop {background:url(img/textarea-tr.png) no-repeat 100% 0;}
.NFTextareaBottom {background:url(img/textarea-br.png) no-repeat 100% 0; margin-bottom:5px;}
.NFTextareaTopLeft, .NFTextareaBottomLeft {width:5px; height:5px;}
.NFTextareaTopLeft {background:#f2f2e6 url(img/textarea-tl.png) no-repeat 0 0;}
.NFTextareaBottomLeft {background:#f2f2e6 url(img/textarea-bl.png) no-repeat 0 0;}
.NFTextareaLeft, .NFTextareaRight, .NFTextareaLeftH, .NFTextareaRightH {float:left; padding-bottom:5px;}
.NFTextareaLeft, .NFTextareaLeftH {width:5px;}
.NFTextareaLeft {background:url(img/textarea-l-off.png) repeat-y 0 0;}
.NFTextareaLeftH {background:url(img/textarea-l-over.png) repeat-y 0 0;}
.NFTextareaRight, .NFTextareaRightH {padding-right:5px; padding-bottom:0;}
.NFTextareaRight {background:url(img/textarea-r-off.png) repeat-y 100% 0;}
.NFTextareaRightH {background:url(img/textarea-r-over.png) repeat-y 100% 100%;}
/*Files*/
.NFFileButton {padding-bottom:0; vertical-align:bottom; cursor:pointer; background:url(img/file.png) no-repeat 0 0; width:60px; height:21px;}
.NFFile {position:relative; margin-bottom:5px;}
.NFFile input.NFhidden {position:relative; filter:alpha(opacity=0); opacity:0; z-index:2; cursor:pointer; text-align:left;}
.NFFileNew {position:absolute; top:0px; left:0px; z-index:1;}
/*Selects*/
.NFSelect {height:21px; position:absolute; border:1px solid transparent;}
.NFSelectLeft {float:left; width:3px; height:21px; background:url(img/select-left.png) no-repeat 0 0; vertical-align:middle;}
.NFSelectRight {height:21px; width:auto; background:url(img/select-right.png) no-repeat 100% 0; cursor:pointer; font:12px/21px Arial, Helvetica, sans-serif; color:#fff; padding-left:3px; margin-left:3px;}
.NFSelectTarget {position:absolute; background:none; margin-left:-13px; margin-top:18px; z-index:3; left:0; top:0; padding-bottom:13px;}
.NFSelectOptions {position:relative; background:#707175; margin-left:16px; margin-top:0; list-style:none; padding:4px 0; color:#fff; font:11px/13px Arial, Helvetica, sans-serif; z-index:4; max-height:200px; overflow-y:auto; overflow-x:hidden; left:0; top:0;}
.NFSelectOptions li {padding-bottom:1px;}
.NFSelectOptions a {display:block; text-decoration:none; color:#fff; padding:2px 3px; background:none;}
.NFSelectOptions a.NFOptionActive {background:#464646;}
.NFSelectOptions a:hover {background:#333;}
/*Multiple Selects*/
.NFMultiSelect {border:0; background:none; margin:0;}
.NFMultiSelectTop, .NFMultiSelectBottom {height:5px; clear:both; float:none; padding-right:10px;}
.NFMultiSelectTop {background:url(img/textarea-tr.png) no-repeat 100% 0;}
.NFMultiSelectBottom {background:url(img/textarea-br.png) no-repeat 100% 0; margin-bottom:5px;}
.NFMultiSelectTopLeft, .NFMultiSelectBottomLeft {width:5px; height:5px;}
.NFMultiSelectTopLeft {background:#f2f2e6 url(img/textarea-tl.png) no-repeat 0 0;}
.NFMultiSelectBottomLeft {background:#f2f2e6 url(img/textarea-bl.png) no-repeat 0 0;}
.NFMultiSelectLeft, .NFMultiSelectRight, .NFMultiSelectLeftH, .NFMultiSelectRightH {float:left; padding-bottom:5px;}
.NFMultiSelectLeft, .NFMultiSelectLeftH {width:5px;}
.NFMultiSelectLeft {background:url(img/textarea-l-off.png) repeat-y 0 0;}
.NFMultiSelectLeftH {background:url(img/textarea-l-over.png) repeat-y 0 0;}
.NFMultiSelectRight, .NFMultiSelectRightH {padding-right:5px; padding-bottom:0;}
.NFMultiSelectRight {background:url(img/textarea-r-off.png) repeat-y 100% 0;}
.NFMultiSelectRightH {background:url(img/textarea-r-over.png) repeat-y 100% 0;}

/*Focused*/
.NFfocused {border:1px dotted #666;}
/*Hovered*/
.NFh {background-position:0 100%;}
.NFhr {background-position:100% 100%;}
/*Hidden*/
.NFhidden {opacity:0; z-index:-1; position:relative;}
/*Safari*/
select, input, textarea, button {outline:none; resize:none;}

Two things. 两件事情。

  1. First if you think it is CSS just remove the CSS file and test it. 首先,如果你认为它是CSS只是删除CSS文件并测试它。
  2. You are referencing external CSS file, please attach CSS so we can see or at least the portion for textbox CSS if you are using that. 您正在引用外部CSS文件,请附加CSS,以便我们可以看到或至少文本框CSS的部分,如果您正在使用它。

Update 更新

I am using VS 2008 here and I ran the above code with CSS and this is what I am coming up with. 我在这里使用VS 2008,我用CSS运行上面的代码,这就是我想出的。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 证书在发布asp.net之后无效 - certificate invalid after publish asp.net 更新过程之前和之后,如何在文本框中显示表数据。 asp.net - how can I present table data in textboxes before and after updating process. asp.net 表单提交后启用文本框和按钮ASP.NET MVC 4 - Enable textboxes and button after form submittal ASP.NET MVC 4 回发后,ASP.NET文本框保留其text属性 - ASP.NET textboxes hold their text property after post back 从ASP.NET中的DropDownList中选择后填充多个文本框 - Fill multiple textboxes after selecting from a DropDownList in ASP.NET 在 Godaddy 上发布我的 asp.net Web 应用程序后发现错误 - Finding error after publish my asp.net web application on Godaddy 更新到beta8后无法发布asp.net 5应用程序 - 依赖...无法解决 - Can't publish asp.net 5 application after update to beta8 - the dependency … could not be resolved asp.net Web应用程序中的文本框控件出现问题。 没有从文本框中获取文本以进行更新 - Problem with Textboxes control in asp.net web application. Didn't get text from textboxes for update 我的 ASP.NET Web 应用程序在 IIS express 上正常运行,但在我发布它时却没有 - My ASP.NET Web application runs normally on IIS express but not when I publish it msbuild 构建和发布 ASP.NET MVC 应用程序 - msbuild build and publish ASP.NET MVC application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM