Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7791445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:53:20+00:00 2026-06-01T21:53:20+00:00

I am passing the following via the request object in codeBehind: Get the Requested

  • 0

I am passing the following via the request object in codeBehind:

Get the Requested code to be created.

Dim Code As String = Request("code").ToString()

and below is my markup page called barcodes.aspx:

  <form id="Form1" method="post" runat="server">
  <img src="barcodes.aspx?code=XXXXX" alt="barcode" /> 

   <asp:Image id="myBarCode"  runat="server"></asp:Image>
  </form>

Why am I getting the error above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:53:22+00:00Added an answer on June 1, 2026 at 9:53 pm

    You need to actually submit the form (POST) or pass the parameters in the URL (GET) to get the request parameters via the Request object. Two easy ways (of many) to do this:

    Option 1. Keep just your barcodes.aspx and barcodes.aspx.vb. In barcodes.aspx put:

    <form id="Form1" method="post" runat="server">
      <input type="hidden" name="code" value="XXXXX" /> 
    
      <asp:Image id="myBarCode"  runat="server"></asp:Image>
      <asp:Button runat="server" Text="Submit"></asp:Button>
    </form>
    

    In barcodes.aspx.vb put in the Page_Load:

    If PostBack Then
      Dim code As String = Request.Form("code")
      If Not String.IsNullOrEmpty(code) Then
        ' Generate your image here, a code has been specified
      End If
    End If
    

    Then just hit the submit button on your aspx page.

    Option 2. Split it into two aspx pages but basically same as above.

    In submitme.aspx put this (for a POST, click the button):

    <form id="Form1" method="post" runat="server">
      <input type="hidden" name="code" value="XXXXX" /> 
    
      <asp:Button runat="server" Text="Submit" PostBackURL="barcodes.aspx"></asp:Button>
    </form>
    

    Or this (for a GET, click the link):

    <a href="barcodes.aspx?code=XXXXX">Click Me</a>
    

    In barcodes.aspx.vb put this in Page_Load (works for either the GET or POST option):

    Dim code As String = Request("code")
    If Not String.IsNullOrEmpty(code) Then
      ' Generate your image here, a code has been specified
    End If
    

    In barcodes.aspx you would then simply need:

    <asp:Image id="myBarCode"  runat="server"></asp:Image>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm passing a JSON object to Javascript via the ViewBag with the following code
I tried passing an std::string via RPC, but I got the following error: MIDL2025:
I have the following code ... var len = request.Code.Trim().Length; if (len.Equals(0)) { throw
my code is following in python. class A(object): b = B() def d(self): print
I am passing in a jQuery object into a function from another file via
my problem is following. I try to parse some data via ajax, passing the
I'm trying to get output value from DB via ADO.NET. There's a client code:
I'm passing the following parameter as an url fragment to flex. (#groupID=2385) This works
jCarousel documentation states the following: By passing the callback function itemLoadCallback as configuration option,
Following on from a comment I made on this: passing std::vector to constructor and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.