开发者

custom controls and query string(asp.net)

开发者 https://www.devze.com 2022-12-27 11:36 出处:网络
How to call a custom control whenquery string is changed? My example not work?Why? &开发者_开发百科lt;% if(Convert.ToInt32(Request.QueryString[\"id\"])==6){%>

How to call a custom control when query string is changed?

My example not work?Why?

  &开发者_开发百科lt;% if(Convert.ToInt32(Request.QueryString["id"])==6){  %>


 <answer:answer_n id="give_me_top_five_news" runat="server" />
     <%} %>


<% if(Request.QueryString["do"]=="registracija"){
       Page.Header.Title = "HHHHH";

        %>
   <reg:f_reg id="custom_controls_for_registration" runat="server" />

    <%} %>


Changed in what fashion? Anytime you load the page with a new URL and query string, the page will be loaded for the first time. You would have to save the info you wanted to store in the Session (for example) and then in the Page_Load event check the query string vs the Session variable to see if they are the same or different.

There may be different ways to do it, but that's what comes to mind off the cuff.

0

精彩评论

暂无评论...
验证码 换一张
取 消