심재운 블로그



1. Exploring the RedirectButton Control's Functionality


<cc1:RedirectButton runat="server" ID="btnToGoogle" 
               RedirectUrl="http://www.google.com/" 
               Text="And We're Off to Google!"
 />


<input type="button" name="btnToGoogle" value="And We're Off to Google!" id="btnToGoogle"
       onclick="skm_Redirect('http://www.google.com/', '');" />


2. Sending User Input in the Querystring

Search: <asp:TextBox ID="txtSearchQuery" runat="server"></asp:TextBox><br />

<cc1:RedirectButton runat="server" ID="btnSearchRedirectButton" 
               AssociatedControlId="txtSearchQuery" 
               QueryStringParameterName="query" 
               RedirectUrl="~/SearchResults.aspx"

               Text="Go!" />

<input type="button" name="btnSearchRedirectButton" value="Go!" id="btnSearchRedirectButton" 
      onclick="skm_Redirect('SearchResults.aspx?q={AssocCtrlValue}', 'txtSearchQueryRedirectButton');" />


3. RedirectButton control adds JavaScript to the associated TextBox 
    so that when the user presses the Enter key it "clicks" the associated button.

Search Google: <asp:TextBox ID="txtSearchGoogle" runat="server"></asp:TextBox>

<cc1:RedirectButton runat="server" ID="btnSearchGoog" 
               AssociatedControlId="txtSearchGoogle" 
               QueryStringParameterName="q" 
               RedirectUrl="http://www.google.com/search" 
               Text="Go!" />



4. Adding the skmControls2 Library to Your Web Application

<%@ Register Assembly="skmControls2" Namespace="skmControls2" TagPrefix="cc1" %>



http://aspnet.4guysfromrolla.com/articles/012809-1.aspx

이 글을 공유합시다

facebook twitter kakaoTalk kakaostory naver band

본문과 관련 있는 내용으로 댓글을 남겨주시면 감사하겠습니다.

비밀글모드