Today, the company's formal environment has a poor function, but the test environment is no problem. After discussion with colleagues, it was found that the visible attribute of textbox was set to false when I was writing code.
At that time, the requirement was to add "related instructions" when sending an email, while "related instructions" were filled in by the first sender, and after receiving the email, log on to the system and send the second email,
The "Description" of the email is the last "Description" written by the first person, rather than "Description ". Because a public upload, email page, and only the first person can see the "Instructions"
Text Box. Therefore, I set the visible of textbox to false by default, and set it to true when the first mail is sent.
The program runs in the test environment. However, when running in the formal environment today, the second person did not get the "Related Description" of the first person ".
After troubleshooting, I found that the visible of textbox was set to false. Although the value can be assigned, the textbox may not be parsed due to different browsers, and the value cannot be taken, so there is no relevant description.
The colleague gave the DIV method to hide and display
<div id="mydiv" runat="server" style="display:none;"> <asp:Label ID="LalExplain" Text="相关说明" runat="server" Visible="false" /> <asp:TextBox ID="TxtBoxExplain" runat="server" Width="700px" TextMode="MultiLine"></asp:TextBox> <asp:Label ID="Label2" runat="server" ForeColor="Red"></asp:Label> </div>
Use the following code in the background to display
mydiv.Style.Value = "display.block";
The following code is parsed by the browser:
<div id="mydiv" style="display:none;"> <textarea name="TxtBoxExplain" rows="2" cols="20" id="TxtBoxExplain" disabled="disabled" class="aspNetDisabled" style="width:700px;">1、信息查询2、系统说明</textarea> <span id="Label2" style="color:Red;"></span> </div>
In this way, the textbox is invisible and can be parsed by the browser.
Problems caused by textbox. Visible = false hiding