...

View Full Version : Using the Request.Form method in asp.net



Bob Burns
07-21-2004, 07:16 PM
I have a page that has one textbox to enter keywords in a search and two dropdown list boxes each called product_id and supplier_id and the textbox is called txtKeywords, my form also has a submit button named btnSubmit. I have attached a custom validator that ensures that some text has been entered in the textbox txtKeywords or at least one of the values of the dropdown list boxes has been selected. If the validation is a success the btnSubmit event procedure is fired in my asp.net code. The event procedure redirects the user to another page called search_results.aspx, which tries to read in the values either from the txtKeyword textbox or the dropdown list boxes using the Request.Form method on page load, here is a sample of my code

Page_Load(ByVal sender As System.Object,ByVal object System.EventArgs)
{

Response.Write(Request.Form("txtKeywords"))
Response.Write(Request.Form("supplier_id"))
Response.Write(Request.Form("product_id"))


}//end of page load

this is all done in the page load event of the search_result.aspx page but for some reason the page doesn't display anything when rendered. Could someone let me know where I have gone wrong!
Thanks Bob.

A1ien51
07-22-2004, 04:30 AM
First off are you using get or post? You should be using get.

that is my first thought on what could be wrong



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum