Copied to clipboard

Flag this post as spam?

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


  • Chris Balodis 4 posts 24 karma points
    Jul 13, 2011 @ 21:29
    Chris Balodis
    0

    querystringparameter in sqldatasource

    Hi, I'm on the latest download version of umbraco...4.x

    I've tried searching the forum but I've found nothing on this. If you have a template that has a gridview and a sqldatasource, that works just fine in umbraco.

    However, if the sqldatasource has its parameter as a querystringparameter, it will only use the defaultvalue set (if it is set).

    I've created a QueryString macro, but I don't see how I can use it within the Sqldatasource tag.

    Same goes for a asp:hyperlink...where we are trying to insert the value of the querystring to form the link url.

    e.g. http://blahsite.com/<querystring macro>.pdf.

    If this can only be done via a usercontrol using codebehind in C# then someone let me know. I have no issue trying to do it that way, just wanting to make sure there is no easier way before I attempt my second usercontrol.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jul 14, 2011 @ 08:50
    Richard Soeteman
    0

    Hi Chris,

    You can us this in a usercontrol + codebehind indeed. Doing that all the time, at the end of the day Umbraco is just asp.net :)

    Cheers,

    Richard

  • Chris Balodis 4 posts 24 karma points
    Jul 15, 2011 @ 15:08
    Chris Balodis
    0

    Thanks,

    Managed to do it as a user control quite easily in fact. Just doing baby steps at the moment, but amazed at how easy it actually is.

    Chris

Please Sign in or register to post replies

Write your reply to:

Draft