www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Server-Side Development > ASP

    ASP Discussion and technical support for using and deploying Active Server Pages.

    Reply
     
    Thread Tools Rate Thread Display Modes
      #1  
    Old 03-10-2010, 03:55 AM
    xida xida is offline
    Registered User
     
    Join Date: Sep 2008
    Posts: 30
    Smile request.query help

    Hi,

    am currently in the middle of constructing a form using visual studio 2008, its on asp.net c# code,

    the first form is to submit the data into a database and send out an email to the relevant person to say that’s its been submit with a link to view the form

    link e.g. view_form.apsx?id=5

    it emails out the link to the person based upon the id of the new row in the database, up to here i have working

    how do i get the view_form to retrieve the id from the url and use it to fill out the printable version of the form.

    this is based upon a building maintenance form so it has multiple labels on how locations and maintenance required along with the persons details

    the information to be retrieved is as follows,

    date, center, requestby, section, email, location1, repair2, location2, repair2, urgency

    any help on this would be very appreciated

    thanks
    Reply With Quote
      #2  
    Old 03-17-2010, 10:53 AM
    jonmaster jonmaster is offline
    Registered User
     
    Join Date: Dec 2009
    Posts: 92
    if you are just asking how to get the query string value here is the snippet

    in the codebehid file of view_form

    protected void Page_Load(object sender, EventArgs e)
    {
    string strid;
    strid = Request.QueryString["id"];

    Response.Write(strid);

    }

    after getting the id value in the strid variable, utilize to refill the new form.
    Reply With Quote
      #3  
    Old 03-24-2010, 04:43 AM
    xida xida is offline
    Registered User
     
    Join Date: Sep 2008
    Posts: 30
    ahh ya i noticed i didnt explain it properly as looking over it i have missed things out sorry

    i have 2 pages,
    1st is the form,
    2nd is the information view page.

    when the first page is filled in and submit it submits the information into a LINQ database (using visual studio to design it)
    once the information is within the database it emails out a form with a link with the id in the url

    e.g. view_form.aspx?id=7

    i then need the 2nd page to get the id from the url,

    i have this code for that

    PHP Code:
      string idParameterValue = Request.QueryString["id"];
            if (
    null != idParameterValue)
            {
                
    int id = 0;
                if (!
    int.TryParse(idParameterValue, out id))
                {
                    
    throw new Exception(string.Format("Unable to read 'id' parameter, value is - {0}", idParameterValue));
                }
            }
    then use the idParameterValue to search the linq database to find that row and export the information into labels,

    e.g. email into lblemail, name to lblname

    thanks for the help
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 12:53 AM.



    Acceptable Use Policy

    Internet.com
    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.