More in this section

Forums / Developing with Sitefinity / SimpleView, access request parameters and response parameters from within

SimpleView, access request parameters and response parameters from within

3 posts, 0 answered
  1. Antoine
    Antoine avatar
    45 posts
    Registered:
    13 Jul 2012
    26 Jul 2011
    Link to this post
    I have a class that inherits from SimpleView.  In my InitializeControls method, as well as in other methods, I would like to access the HttpRequest and HttpResponse.  How do I get access to these from within my class?

    My intention is to determine the parameters passed in the URL.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    29 Jul 2011
    Link to this post
    Hi Antoine,

    The HttpContext can be requested directly:
    protected override void InitializeControls(GenericContainer container)
    {
        var context = HttpContext.Current;
     
    }


    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Antoine
    Antoine avatar
    45 posts
    Registered:
    13 Jul 2012
    29 Jul 2011
    Link to this post
    Thanks Radoslav.

    I appreciate your help answering what, in hindsight, looks to be more like a .NET question then a Sitefinity question.
3 posts, 0 answered