1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Post Method in ASP.net

Discussion in 'C#' started by Philosophaie, Jul 10, 2012.

  1. #1
    I have an ASP.net program. It contains:
    SEMrush
    <%
        If Request.ServerVariables("REQUEST_METHOD") = "POST"
            Dim num = Request.Form("TextBox1")
        End If
    %>
    Code (markup):
    This will bring TextBox1 from another aspx file using the post method.

    What I want to know is how to get the variable "num" into a vb program later in the same file?

    One way:

    <asp:Label ID="num1" runat="server" Text="<% num %>"></asp:Label>
    Code (markup):

    Is there any way of inserting the variable right into the vb program itself?
     
    Philosophaie, Jul 10, 2012 IP
    SEMrush
  2. veganin

    veganin Greenhorn

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    should do the job
     
    veganin, Jul 21, 2012 IP
  3. diyaots

    diyaots Greenhorn

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    Hi dear

    You can write like this num1.text=num, by this you can solve your problem.

    Thanks
    Diya
     
    diyaots, Oct 8, 2012 IP