More in this section

Forums / Developing with Sitefinity / Forms - Hidden Field/Look up field

Forms - Hidden Field/Look up field

2 posts, 0 answered
  1. Stuart Radlett
    Stuart Radlett avatar
    12 posts
    Registered:
    13 Feb 2009
    31 Aug 2011
    Link to this post
    Has anyone managed to setup a form within Sitefinity 4 which can have a hidden field set its value based on a parameter sent to the form via the url. For example: http://mysite.com/myform?EventCode=1234 - ideally I'd like to know the method to lookup the event name of 1234 from an external database.

    Thanks,


    Stuart
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    05 Sep 2011
    Link to this post
    Hello Stuart Radlett,

    I'm not sure I understand what you want to achieve. If you have some Sitefinity page with a form on it you could assign a code-behind class to this page and implement a Page_Load event handler where you could simply read the value of Request.QueryString["EventCode"]. Then you can lookup the value in the database using some ADO.NET classes or if the database is mapped through OpenAccess - using the OA model classes.

    Does this answer you question?

    Greetings,
    Lubomir Velkov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

2 posts, 0 answered