Click here to Skip to main content
15,919,613 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerSave html content to SqlServer Pin
Rahul Babu5-Jun-07 20:04
Rahul Babu5-Jun-07 20:04 
QuestionSOAP VC++ Client Pin
Kabirdas Jaunjare5-Jun-07 18:26
Kabirdas Jaunjare5-Jun-07 18:26 
QuestionThree second timer Pin
Michael1015-Jun-07 16:52
Michael1015-Jun-07 16:52 
AnswerRe: Three second timer Pin
Steve Echols5-Jun-07 17:40
Steve Echols5-Jun-07 17:40 
GeneralRe: Three second timer Pin
Michael1015-Jun-07 23:26
Michael1015-Jun-07 23:26 
QuestionReceipt Log Pin
Cory Hatton5-Jun-07 12:51
Cory Hatton5-Jun-07 12:51 
AnswerRe: Receipt Log Pin
Not Active5-Jun-07 14:36
mentorNot Active5-Jun-07 14:36 
GeneralRe: Receipt Log [modified] Pin
Cory Hatton6-Jun-07 2:59
Cory Hatton6-Jun-07 2:59 
GeneralRe: Receipt Log Pin
Not Active6-Jun-07 5:16
mentorNot Active6-Jun-07 5:16 
GeneralRe: Receipt Log Pin
Cory Hatton6-Jun-07 6:21
Cory Hatton6-Jun-07 6:21 
QuestionGetting Web Application's Virtual Path from Server Control Pin
Nadia Monalisa5-Jun-07 5:54
Nadia Monalisa5-Jun-07 5:54 
QuestionValidation Pin
Rahul Babu5-Jun-07 3:52
Rahul Babu5-Jun-07 3:52 
AnswerRe: Validation Pin
Not Active5-Jun-07 5:04
mentorNot Active5-Jun-07 5:04 
QuestionHow to handle onselectindexchanged method in UserControl(.ascx page) Pin
ramyasangeet5-Jun-07 3:47
ramyasangeet5-Jun-07 3:47 
AnswerRe: How to handle onselectindexchanged method in UserControl(.ascx page) Pin
Mariusz Wojcik5-Jun-07 4:24
Mariusz Wojcik5-Jun-07 4:24 
GeneralRe: Example using Interface Pin
Mariusz Wojcik5-Jun-07 4:47
Mariusz Wojcik5-Jun-07 4:47 
OKi,

in addition to my above answer, there is a solution which uses interface.

First, we implement an Interface:

public interface IRadioButtonListEvent<br />
{<br />
  void RadioButtonIndexChangedProc(object sender, System.EventArgs e);<br />
}


As you can see, our interface implements just one method, which will be called whenever selected item index changes.


Now, in the User Control, RadioButtonList1_SelectedIndexChanged should look like this:

private void RadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e)<br />
{<br />
  IRadioButtonListEvent iPage = (IRadioButtonListEvent) Page;<br />
  iPage.RadioButtonIndexChangedProc(sender, e);<br />
}<br />


And finally, code for hosting web page. As i mentioned above, page must implement an IRadioButtonListEvent interface.

public class WebForm1 : System.Web.UI.Page, IRadioButtonListEvent<br />
...<br />
<br />
public void RadioButtonIndexChangedProc(object sender, System.EventArgs e)<br />
{<br />
  RadioButtonList rbl = (RadioButtonList) sender;<br />
  // do whatever you need...<br />
}


--
Mariusz 'mAv' Wójcik
master e-software engineer

GeneralRe: How to handle onselectindexchanged method in UserControl(.ascx page) Pin
Not Active5-Jun-07 5:07
mentorNot Active5-Jun-07 5:07 
AnswerRe: How to handle onselectindexchanged method in UserControl(.ascx page) Pin
Not Active5-Jun-07 5:14
mentorNot Active5-Jun-07 5:14 
QuestionPrint button in crystal report..., Pin
Member 38798815-Jun-07 3:04
Member 38798815-Jun-07 3:04 
Questionmaster detail Pin
kvijayajyothy5-Jun-07 3:03
kvijayajyothy5-Jun-07 3:03 
AnswerRe: master detail Pin
Not Active5-Jun-07 3:43
mentorNot Active5-Jun-07 3:43 
AnswerRe: master detail Pin
badgrs5-Jun-07 22:22
badgrs5-Jun-07 22:22 
Questioncookies : how to write page_load to cookies Pin
kinsella_john5-Jun-07 1:43
kinsella_john5-Jun-07 1:43 
AnswerRe: cookies : how to write page_load to cookies Pin
Mariusz Wojcik5-Jun-07 2:05
Mariusz Wojcik5-Jun-07 2:05 
QuestionValidation to accept only numbers!!! Pin
rameshbhojan5-Jun-07 1:30
rameshbhojan5-Jun-07 1:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.