More in this section

Forums / Developing with Sitefinity / How to set values in backend and pass it to code?

How to set values in backend and pass it to code?

2 posts, 0 answered
  1. Surya CD
    Surya CD avatar
    57 posts
    Registered:
    06 Apr 2010
    26 May 2012
    Link to this post
    Hi,
    I am doing a site in SF 5.  There are 2 contact forms. Same user control is used in both. The email notification should go to different address on submitting the forms. 
     When ContactForm1 is submitted, it should go to admin1@site.com 
    and if ContactForm2 is submitted, mail should go to admin2@site.com.

    Now I  have hardcoded these values in web.config. But the actual requirement is that
    one should be able to provide the address while dragging the usercontrol to the placeholder in the form. ie at the time of setting the usercontrol to the contact form. ie. How the user control can fetch values set in back end?
    IS IT POSSIBLE TO SET VALUES IN THE BACKEND?

    ie. the administrator should be able to set the values from the admin site without any need of changing the code in the usercontrol.
    How can this be done. Please help.


  2. MB
    MB avatar
    302 posts
    Registered:
    09 Jan 2005
    26 May 2012
    Link to this post
    You need to develop the logic that relates location to value, and provide that in the control. Running from VS and break-pointing the control can be instructive in this process.
2 posts, 0 answered