Querystring value in form with frames [Resolved]
I have this form with frames on it. This form is for authorities to come on and process the submitted form. The first frame is the submitted webform, and the second form is the authority's work form.
On the webform I have code in the page_load event to check the querystring value of url and if an id value exists it will populate the webform by looking up the id in the database and place all values on the form for the authority to view.
The problem is that the page_load event on the webform does not recognize the querystring variable passed to the form with frames, but the page_load does run, just the value of the id is "".
Can anyone tell me how to pass the value from the frames form to the webform so the querystring value is not blank. That or tell me what it is that I should be doing differently to get this to work. That is assuming I made sense just now.
Thanks again.
Re: Querystring value in form with frames
Quote:
Originally Posted by token
That or tell me what it is that I should be doing differently to get this to work.
Don't use frames. There isn't a very easy way of doing this, the only thing I would beable to think of is using javascript to redirect to the frame location and concatenate the string you want in the querystring of the javascript redirect. But I've never done anything liek that before.
So I stand by my suggest of don't use frames. There is always a way to do everything without frames.
Re: Querystring value in form with frames
I dont like using frames either, I havent used frames since i was in school. I was just trying to mimic something that was done in the previous application.
Do you have any suggestions as to what i could do?
Re: Querystring value in form with frames
To get rid of frames? Or to make what you are trying to do work?
Re: Querystring value in form with frames
Either or.
I would like to get what I'm doing to work, but an alternative would be just as good.
The reason why frames would be good is that the webform is quite big and the authority needs to see and review the webform request. And based on the request they will complete another form to authorize the work and routing it to a vendor.
Any suggestions?
Re: Querystring value in form with frames
Like I said you would have to use javascript to set the locations of the other frames.
So in your main page where ou build the frameset you would have to have the querystring values you need sent to that page
then in javascript you could do
VB Code:
parent.frameName.location.href = "page.aspx?var=<%= Request.Querystring("var") %>"
Tht I beleive is in the only way you are going to be able to do this.
btw..I jacked the skeleton of the code above from here:
http://developer.irt.org/script/3.htm
Re: Querystring value in form with frames [Resolved]
I was able to fix my problem.
On the main page holding the frames, I just edit the src attribute for the fram to read as follows:
<frameset rows="70%,30%">
<frame name=frame1" src="frmWebform.aspx?key=<%= Request.QueryString("key") %>">
<frame name="frame2">
</frameset>
And she works like a charm. Found the solution posted on another forum, with someone trying to do exactly what i was doing.