SharePoint User Group UK

Share the knowledge!

Welcome to SharePoint User Group UK Sign in | Join | Help
in
Home Blogs Forums Photos Files Roller

Passing a variable.

Last post 04-02-2008, 11:22 AM by Vishan. 4 replies.
Sort Posts: Previous Next
  •  03-20-2008, 10:31 AM 9251

    Passing a variable.

    Hi. i need to pass a variable from a link,  (below), as u can see i have the id=1234.... what i need is that 1234 to be displaced in a text box in the list. Please help.

    Thanks.

    www.sharepointsite.com/list/newitem.aspx?id=1234

     


    Vishan
  •  03-20-2008, 2:46 PM 9257 in reply to 9251

    Re: Passing a variable.

    MyTextBox.Text = Page.Request.QueryString("id");

     


    Paul Leigh
  •  03-26-2008, 9:25 AM 9322 in reply to 9257

    Re: Passing a variable.

    Hi Paul, could you please elaborate a bit about your answer please.

    The solotuion makes sense, but where do i write that line of code in?

    in SPD?

     

    Thanks.


    Vishan
  •  03-26-2008, 10:11 AM 9324 in reply to 9322

    Re: Passing a variable.

    Hi Vishan,

    What are you trying to achieve? Looking at your post again, you are referencing the newitem page which one normally wouldn't call with an ID as it's designed to create a new id when a new item is created. (I could understand the editform being called this way).

    Anyway, basically if you want to run inline code, you'll need to make some alterations to your setup to allow it. A past colleague of mine posted a blog about this a while ago (PageParserPaths) http://geekswithblogs.net/sevans/Default.aspx

    Then once you've done that it would be a matter of adding a script block to the ASPX page with the code above, it it.

    Cheers,

    Paul.


    Paul Leigh
  •  04-02-2008, 11:22 AM 9480 in reply to 9324

    Re: Passing a variable.

    We have now kind of changed the scenario.

    A user is sent an e-mail with an ID number..

    I have created a survey with a column called "ID Number"

    is there a way i can get the id number from the e-mail to appear in the column ID Number


    Vishan
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems