Click here to Skip to main content
15,903,201 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
AnswerRe: Validation to accept only numbers!!! Pin
Mariusz Wojcik5-Jun-07 1:56
Mariusz Wojcik5-Jun-07 1:56 
AnswerRe: Validation to accept only numbers!!! Pin
Nouman Bhatti5-Jun-07 2:14
Nouman Bhatti5-Jun-07 2:14 
AnswerRe: Validation to accept only numbers!!! Pin
koolprasad20035-Jun-07 2:16
professionalkoolprasad20035-Jun-07 2:16 
GeneralRe: Validation to accept only numbers!!! Pin
DavidNohejl5-Jun-07 4:23
DavidNohejl5-Jun-07 4:23 
AnswerRe: Validation to accept only numbers!!! Pin
Rahul Babu5-Jun-07 3:42
Rahul Babu5-Jun-07 3:42 
Questionneed help with adding an all option to the data grid parameter. Pin
neodeaths5-Jun-07 1:09
neodeaths5-Jun-07 1:09 
Questionhow to display, modify MS Excel sheet in ASPX page using .NET 1.1 with C# Pin
rajnish_haldiya5-Jun-07 0:03
rajnish_haldiya5-Jun-07 0:03 
AnswerRe: how to display, modify MS Excel sheet in ASPX page using .NET 1.1 with C# Pin
Sathesh Sakthivel5-Jun-07 0:08
Sathesh Sakthivel5-Jun-07 0:08 

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.