Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: select server control to run based on querystring


Message #1 by "Rich K" <rich@r...> on Wed, 31 Jul 2002 12:53:13 -0400
Could someone help me solve the following sceniaro.
I have 2 custom server controls and would like to execute one depending on
the value of a querystring that is passed.
this is the scenario I am trying to solve. Thanks for your help in advance.
Rich

<%@ Register TagPrefix="1" Namespace="control1" Assembly="control1"%>
<%@ Register TagPrefix="2" Namespace="control2" Assembly="control2"%>
<%@ page language="c#" %>
<script language="c#" runat="server">
 void Page_Load(Object sender, EventArgs e)
 {
 string strx = Request.QueryString.Get("xvalue");
 }
</script>

if (strx==1)
{
<XMLFeed:Custom1 runat="server" ID="1" />
}
if (strx==2)
{
<XMLFeed:Custom2 runat="server" ID="2" />
}


  Return to Index