Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 09, 2013 05:15 AM by Talal Tayyab
Member
11 Points
184 Posts
Feb 09, 2013 03:50 AM|LINK
Hi,
I have Report viewer control as a user control.In existing dot net application in page load they have this.
I do not know where to write this code in whether in model,controler or view.....
In Page Load:
string strServerName = Request.ServerVariables["SERVER_NAME"].ToString().ToUpper();
if (strServerName.ToUpper() == "LOCALHOST")
{
strServerName ="localhost/test";
}
rptFame.ServerUrl ="https://" + Session["Reporting"].ToString() + "/ReportServer";
rptFame.ReportPath ="/Central/Fame";
Any reference urls .............
Participant
902 Points
132 Posts
Feb 09, 2013 05:15 AM|LINK
ReportViewer is a asp.net server side control so it cannot be used directly in MVC. The options are to use ASP.NET web page inside an mvc application. Please see the links below.
Link 1 - Stack overflow discussion
Blog Post
MVC 4
guhan77
Member
11 Points
184 Posts
Report Viewer control as user control - URGENT
Feb 09, 2013 03:50 AM|LINK
Hi,
I have Report viewer control as a user control.In existing dot net application in page load they have this.
I do not know where to write this code in whether in model,controler or view.....
In Page Load:
string strServerName = Request.ServerVariables["SERVER_NAME"].ToString().ToUpper();
if (strServerName.ToUpper() == "LOCALHOST")
{
strServerName ="localhost/test";
}
rptFame.ServerUrl ="https://" + Session["Reporting"].ToString() + "/ReportServer";
rptFame.ReportPath ="/Central/Fame";
Any reference urls .............
Talal Tayyab
Participant
902 Points
132 Posts
Re: Report Viewer control as user control - URGENT
Feb 09, 2013 05:15 AM|LINK
ReportViewer is a asp.net server side control so it cannot be used directly in MVC. The options are to use ASP.NET web page inside an mvc application. Please see the links below.
Link 1 - Stack overflow discussion
Blog Post
MVC 4