473,378 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Somebody please explain the following Class Declaration

public class ParticipantRadioButton :
System.Web.UI.HtmlControls.HtmlInputRadioButton, IPostBackDataHandler {

bool IPostBackDataHandler.LoadPostData( string postDataKey,
NameValueCollection postCollection ) {
bool result = false;
string postedValue = postCollection[this.RenderedNameAttribute];
if (postedValue != null && postedValue == this.Value) {
if ( this.Checked) {
return result;
}
this.Checked = true;
result = true;
}
else if (this.Checked) {
this.Checked = false;
}
return result;
}

Is this class Inheriting HtmlInputRadioButton and Implementing
IPostBackDatahandler?

If so how is this possible since HtmlInputRadioButton already implements
the IPostBackDatahandler interface?

And Last but not least how do I do this in VB.Net if you know?

Nov 17 '05 #1
2 2119
"Chris Lane" <Ch*******@discussions.microsoft.com> schrieb im Newsbeitrag
news:96**********************************@microsof t.com...
public class ParticipantRadioButton :
System.Web.UI.HtmlControls.HtmlInputRadioButton, IPostBackDataHandler {

bool IPostBackDataHandler.LoadPostData( string postDataKey,
NameValueCollection postCollection ) {
bool result = false;
string postedValue = postCollection[this.RenderedNameAttribute];
if (postedValue != null && postedValue == this.Value) {
if ( this.Checked) {
return result;
}
this.Checked = true;
result = true;
}
else if (this.Checked) {
this.Checked = false;
}
return result;
}

Is this class Inheriting HtmlInputRadioButton and Implementing
IPostBackDatahandler?
Yes!
If so how is this possible since HtmlInputRadioButton already implements
the IPostBackDatahandler interface?
If HtmlInputRadioButton implements IPostBackDataHandler, then its derived
classes
als implement it (implicitly).
Naming IPostBackDataHandler in tha class header makes it possible to
defining
new implentations for the Interface members as is done with
IPostBackDataHandler.LoadPostData

And Last but not least how do I do this in VB.Net if you know?


Should be something like that:

Public Class ParticipantRadioButton
Inherits System.....RadioButton
Implements IPostBackHandler
......
Private Function LoadPostData(........) Implements
IPostBackDataHandler.LoadPostData
.....
End Function
......
End Class

Hope that helps
Christof
Nov 17 '05 #2
> Should be something like that:

Public Class ParticipantRadioButton
Inherits System.....RadioButton
Implements IPostBackHandler


Thanks but for some reason the ide is giving me this error even though this
should work.

Interface 'System.Web.UI.IPostBackDataHandler' is already implemented by
base class 'System.Web.UI.HtmlControls.HtmlInputRadioButton'.

I will post in the VB.Net newgroup if I can't figure it out.

Thank You!

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Dean | last post by:
Hi I have been reading quite a lot of Python source code recently and I have come across a particular construct which I don't understand. I would be grateful if somebody could explain the reason...
7
by: Dan Trowbridge | last post by:
He everyone, I am just getting started with .NET and I am having a porting problem. I get and error in code that lookssomething like this (really stripped down but you get the idea)... class...
10
by: Matt | last post by:
Hello Everyone I am making an instant messenger program. I have used the MSDN sockets example to get started with this. I have transfered the code that is found within this project into a class...
2
by: garyusenet | last post by:
I could do with something similiar, can you tell me if you think this would work for me, and if there's any advantage in working with controls this way than how I currently am. At the moment...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.