Wednesday 23 October 2013

System.Web.HttpException: 'HtmlSelect' cannot have children of type 'LiteralControl'.

System.Web.HttpException: 'HtmlSelect' cannot have children of type 'LiteralControl'.

if you are getting this type of error while executing on running your asp.net application

in c# or in vb.net you must know about real cause or from where this error is occurring.

lets.. reavel this now what i did i just took

<select>
<option>
some information
</option>

</select>

and added runat="server" at .aspx page .


<select size="1" name="region" id="region"  runat="server">

now if we  run its gives error System.Web.HttpException: 'HtmlSelect' cannot have children

of type 'LiteralControl'....
to remove this error and make your application work easily..just add form name in your

.aspx pahe and add then add this line of code to .cs page.

remove runat="server"
Request.Form["region"].ToString();
and try now hope its works..
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: