Auto Populate SharePoint Form Field from a query string

Posted on 2007-10-05
Last Modified: 2008-01-09
I am trying to get a Query String from the URL to automatically populate a <SharePoint:FormFiled> that is used to add a new item to a list.  This way when the user navigates to the page, they would not have to fill in that feild.
Question by:DataBridge
    LVL 7

    Expert Comment

    by:Abu Hamdan
    As i understand you have a form that redirect or linked to another form,, and the the other sharepoint form should read the querystring and bind it ?

    Solution as follows:


    and on your sharepoint page you should write custom code, to request these value on page load:

    string myPar1 = Request.QueryString["test1"];
    string myPar1 = Request.QueryString["test2"];

    if you dont know how to write code in sharepoint form,, tell me ,, but its easy using sharepoint designer



    Author Comment

    This site is on a shared server so I am unable to write any real code other than, and I am not great with in sharepoint.
    LVL 7

    Accepted Solution

    Sorry my friend this is the only way you could do this ,, but take a look on how to write with sharepoint on these links:

    and writing code in sharepoint will be using inline code mixed with html ,,

    Author Comment

    Well I appreciate you help anyway, thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
    Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now