Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mark Olbert 87 posts 117 karma points
    Oct 08, 2009 @ 19:39
    Mark Olbert
    0

    Storing Visitor Info in Separate DB Table

    I'm just getting started with Umbraco, although I have a fair amount of experience developing ASP.NET sites.

    My current project (a political website) involves capturing information about visitors -- which they agree to supply -- so that I can use it in other applications (e.g., generating mailings, letting people find each other).

    My tentative thought is that I'd like to capture this information to SqlServer tables that I design, and which are not part of Umbraco's setup. That's so that I can write other apps that use the data. Does that make sense? What approach do I use to build a custom page within Umbraco to let me capture and store the information?

    Apologies for the somewhat vague nature of these questions. Part of my challenge is coming down the learning curve of Umbraco terminology. I'm not quite sure what terms to use to describe what I'm trying to do.

    - Mark

  • Jesper Ordrup 1000 posts 1478 karma points MVP
    Oct 08, 2009 @ 20:32
    Jesper Ordrup
    0

    Hi Mark,

    You can use regular asp.net usercontrols in an Umbraco website. This - I guess -  is by far the easiest way for you being used to ASP.NET sites. I just wanted to give you a quick heads up on this. Look for more here: http://our.umbraco.org/search?q=usercontrol and feel free to ask again.

    /Jesper

     

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Oct 08, 2009 @ 22:48
    Nik Wahlberg
    0

    Welcome aboard Mark. Forgive me is this is too basic, but I am not sure what you know/don't know...

    Umbraco uses something called Macros in order to include custom functionality and output with your templates (created within the Settings section) and pages (created by authors in the Content section). These macros can point to a number of things - most commonly XSLT files or .NET usercontrols (.ascx). It sounds like you are familiar with .NET apps in general, so here we go:

    1. Within a new VS project, you can create the necessary ascx files and supporting .cs/.vb.
    2. Compile and deploy the usercontrols to the {umbraco installation dir}/usercontrols and the resulting compiled library to the {umbraco installation dir}/bin folder. 
    3. Navigate to the Developer section in your Umbraco backend
    4. Right-click the Macros folder to create a new Macro
    5. Select, from the .NET Usercontrol dropdown your newly added usercontrol
    6. Save the Macro (NOTE: If you want to include this UC in a page - within the Content section - you must check off "Use In Editor")
    7. Now, simply navigate to your temaplte and/or page and select to include the Macro and follow the wizard steps

    It's really that simple. Now, if you are planning on creating custom sections within the Umbraco admin to display the results of these submissions I would (STRONGLY) recommend that you get a subscription to Umbraco.TV (http://umbraco.tv). And no, I don't work for Umbraco or get any kick-backs. I get my subscription when the vids first came out and it has been a HUGE resource to me. There is an excellent (recently added) tutorial on creating section in there (along with a ton of other material).

    Hope this is somewhat helpful.

    Cheers,
    Nik

  • Mark Olbert 87 posts 117 karma points
    Oct 09, 2009 @ 04:21
    Mark Olbert
    0

    Thanks to both of you for your quick replies. I think I'm beginning to understand how I can include custom functionality in an Umbraco site.

    I'll also definitely check out umbraco.tv.

    - Mark

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies