Solved

Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Windows.Forms.Control'

Posted on 2016-10-10
2
11 Views
Last Modified: 2016-10-29
hi,

i am trying to getting my all controls from the asp.net page, while i am reading the controls it will thrown an  error like as the tittle.
plz any  one can resolve it.
0
Comment
Question by:Deepan kumar
  • 2
2 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points (awarded by participants)
ID: 41837047
You are trying to cast chalk to cheese - no relationship.  
You need to use the System.Web.UI based controls not the System.Windows.Forms based controls as you try to do at present.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41865062
Wrong cast was tried
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now