asp.net - How to solve the following compilation error in C#? -


my .aspx looks following:

<div id="valueintroduction" type="text" class="labelarea" runat="server">     <input name="$labeluniversityid" type="text" id="labeluniversityid" style="color:#7d110c;border:0;background-color:#c0d5f2;width:100%" /> </div> 

.cs file looks like:

    if (results.read())     {        labeluniversityid.value = results["text_content"].tostring();     } 

exactly trying getting data database , displaying in valueintroduction div. workiing fine. added text box readonly mode. in page if press edit button, value edited.

use texbox component:

<asp:textbox id="labeluniversityid" runat="server" cssclass="yourcssclass"></asp:textbox> 

as styling:

.yourcssclass { color:#7d110c; border:0; background-color:#c0d5f2; width:100% } 

then, in code behind can use this:

labeluniversityid.text = results["text_content"].tostring(); 

keep in mind asp.net controls translated common html tags, can wrap , style other normal input of type text.

also: type="text" not valid div


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -