[thelist] .NET - using variable as form field value

Ken Schaefer ken.schaefer at gmail.com
Wed Aug 1 20:38:43 CDT 2007


Why aren't your posting the form to itself?

But in any case you should be able to do something like:

Sub Page_Load()

   If Not isPostBack Then

      myFormField.value = Request.Form("yourFormField")

   End If

End Sub


Cheers
Ken



On 8/2/07, Joel D Canfield <joel at streamliine.com> wrote:
> really *really* new to .NET, so this is probably deadly simple:
>
> how do I get the value of the requesting form's field 'EmpID' and insert
> it into a hidden form field in the new page?
>
> in classic ASP, I'd do this:
>
>    <%
>      Dim intEmpID
>      intEmpID = Request.Form("EmpID")
>    %>
>
>    <input type="hidden" name="EmpID2" id="EmpID2" value="<%=intEmpID%>"
> />
>
> grrr . . . I hate starting over again
>
> thanks
>
> joel
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list