Passing querystring parameters to Frameset -- How?

  • Thread starter news-server.maine.rr.com
  • Start date
N

news-server.maine.rr.com

Hi,

In a nutshell, how to pass query string parameters to a frameset page and
extract them using Request["param_name"] and then pass them to a frame src ?


I have the following situation, and this may be a FAQ but I have not found
the answer:

A list of accounts on one aspx page like this:

User A href="my_frameset.aspx?account_id=<%= iAccountId %>" ... which
repeats for an arrayList of accounts, generating a unique URL for each a
href link


On the Frameset page (my_frameset.aspx):



<frameset rows="25%,75%" id="AccountMemberFrameset"
name="AccountMemberFrameset" runat="server" >

<% int iAccountId = Convert.ToInt32(Request["account_id"]); %>

<frame runat="server" id="account_member_filter_frame"
name="account_member_filter_frame"
src="AccountMembersFilterFrame.aspx?account_id=<%=iAccountId%>" />

<frame runat="server" id="account_member_frame" name="account_member_frame"
src="AccountMembers.aspx" />

</frameset>

</html>



Now... when I call Request["account_id"] from the
AccountMembersFilterFrame.aspx the value I get back is "<%=iAccountId%>"
which indicates the frameset page is not "resolving" the value of
<%=iAccountId%>



Thanks for any tips.

Frank
 
F

Frank Milverckowitz

<frameset rows="25%,75%" id="AccountMemberFrameset"
name="AccountMemberFrameset" runat="server" >

<% int iAccountId = Convert.ToInt32(Request["account_id"]); %>

<frame runat="server" id="account_member_filter_frame"
name="account_member_filter_frame"
src="AccountMembersFilterFrame.aspx?account_id=<%=iAccountId%>" />

<frame runat="server" id="account_member_frame"
name="account_member_frame" src="AccountMembers.aspx" />

</frameset>

</html>


Hi,

I figured it out -- tje solution was to remove the runat=server from each
frame and just have runat=server in the frameset tag.
I also changed the frameset id so it wouldn't conflict with the class name
(I don't know if that matters, but why guess?)
I also changed the DTD type to HTML 4.0 instead of the XHTML Transitional (I
think strict) which doesn't know what frames are.

thx,
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top