Report Viewer control as user control - URGENT RRS feed

  • Question

  • User118018937 posted


    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 .............


    Friday, February 8, 2013 11:50 PM


  • User538021195 posted

    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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 9, 2013 1:15 AM