This is a migrated thread and some comments may be shown as answers.

Design mode doesnot work in Visual studio for aspx file

3 Answers 298 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Srinath
Top achievements
Rank 1
Srinath asked on 20 Jul 2012, 11:53 PM
HI,

I create a .aspx file and try to open in design mode, my VS 2010 doesn't respond.
Did any one face this kind of problem. Is this because of telerik? It worked fine until yesterday when this happened.

The reason i need design mode is because i need to create a partial view and add telerik report viewer to the partial view in design mode.
If i add the code to add the telerik report viewer in source code it doesn't work.

<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=6.1.12.611, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>




        <script runat="server">
        
            public override void VerifyRenderingInServerForm(Control control)
            {
                // to avoid the server form (<form runat="server">) requirement
            }


            protected override void OnLoad(EventArgs e)
            {
                // bind the report viewer
                base.OnLoad(e);
       
            }


        </script>
   
       <form id="form1" runat="server">
       <telerik:ReportViewer ID="ReportViewer1" runat="server" Width="100%">
<typereportsource 
           typename="WebEnrollment.Public.Web.Reports.ByProductReport, WebEnrollment.Public.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"></typereportsource>
</telerik:ReportViewer>
</form>

It throws runtime exception

System.Web.HttpCompileException was unhandled by user code

  Message=c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\webenrollment.public.web\185985ee\24be7516\App_Web_productviewpage.aspx.b76dddab.hrocxo6x.0.cs(245): error CS0234: The type or namespace name 'Reporting' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)

3 Answers, 1 is accepted

Sort by
0
Accepted
IvanY
Telerik team
answered on 24 Jul 2012, 05:02 PM
Hi Srinath,

We were not able to reproduce such a problem using the code snippet you have provided above. Perhaps you have some settings/projects/references that are missing or set differently and we are not aware of them - please provide us with more information about your setup. You can also send us steps to reproduce the issue, what you are trying to achieve or even better - a runnable sample that exhibits the problem.

Additionally please note that setting the report source in the code behind file is the best solution, which gives you more control over your code.

Regards,
IvanY
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Srinath
Top achievements
Rank 1
answered on 24 Jul 2012, 06:09 PM
Thanks for prompt response.

Now it works.

The problem is when i drag and drop telerik report viewer in design mode, it creates entries in web.config file.
But when i added telerik report viewer in source mode i forgot to make necessary changes in web.config and thats the reason for error.

Thanks.
Srinath
0
Accepted
Steve
Telerik team
answered on 25 Jul 2012, 07:47 AM
Hi Srinath,

The http handler is automatically registered in the web.config only when the report viewer control is dropped from the Toolbox to the design surface of a web form. If you drop the report viewer in the text editor (source view) or add it to the web form programatically, you should manually register the http handler using the xml markup below.

This information is available in the How to: Add report viewer to a web page help article.

Kind regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Srinath
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Srinath
Top achievements
Rank 1
Steve
Telerik team
Share this question
or