Click here to Skip to main content
15,917,005 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: there must be an easy way to do this. asyncronous pages nightmare Pin
Paddy Boyd4-Dec-08 5:03
Paddy Boyd4-Dec-08 5:03 
GeneralRe: there must be an easy way to do this. asyncronous pages nightmare Pin
paul langan4-Dec-08 5:11
paul langan4-Dec-08 5:11 
QuestionCall a function declared in content page from master page [modified] Pin
Mohamed Arif4-Dec-08 3:01
Mohamed Arif4-Dec-08 3:01 
AnswerRe: Call a function declared in content page form master page Pin
moon_stick4-Dec-08 3:49
moon_stick4-Dec-08 3:49 
GeneralRe: Call a function declared in content page form master page Pin
Mohamed Arif4-Dec-08 4:03
Mohamed Arif4-Dec-08 4:03 
GeneralRe: Call a function declared in content page form master page Pin
moon_stick4-Dec-08 4:13
moon_stick4-Dec-08 4:13 
GeneralRe: Call a function declared in content page from master page [modified] Pin
Mohamed Arif4-Dec-08 5:42
Mohamed Arif4-Dec-08 5:42 
GeneralRe: Call a function declared in content page from master page [modified] Pin
moon_stick4-Dec-08 6:45
moon_stick4-Dec-08 6:45 
In VB.NET you need to specify the function that implements the interface so instead of

<br />
Public Function ValidateControl As String<br />
Dim A As String = "Yes"<br />
Return A<br />
End Function<br />


you need to decorate the method signature as:

<br />
Public Function ValidateControl As String Implements IContent.IContent.ValidateControl<br />
Dim A As String = "Yes"<br />
Return A<br />
End Function<br />


The code in the final section is almost right - it should look like this:

<br />
   Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)<br />
        Dim child As IContent.IContent<br />
        child = DirectCast(Me.Page, IContent.IContent)<br />
        child.ValidateControl()<br />
    End Sub<br />


Obviously you'll want to change the return type of 'ValidateControl()', probably so that it returns a boolean rather than a string. You can do this by changing the signature specified by the interface and then making the appropriate function change so that a true or false value is returned depending on whether the control was successfully validated.

Interfaces are very important in OO design so I'd recommend having a look around the internet (starting with CodeProject!) for some decent articles.

Hope that helps

It definitely isn't definatley

modified on Thursday, December 4, 2008 12:55 PM

GeneralRe: Call a function declared in content page from master page Pin
Mohamed Arif4-Dec-08 7:12
Mohamed Arif4-Dec-08 7:12 
QuestionHow to save Iframe Content to server using Asp.net Pin
jamesrajesh4-Dec-08 2:42
jamesrajesh4-Dec-08 2:42 
QuestionError: GridView with checkbox --plz reply urgent Pin
premprakashbhati4-Dec-08 1:49
premprakashbhati4-Dec-08 1:49 
AnswerRe: Error: GridView with checkbox --plz reply urgent Pin
moon_stick4-Dec-08 4:24
moon_stick4-Dec-08 4:24 
AnswerRe: Error: GridView with checkbox --plz reply urgent Pin
Paul Conrad4-Dec-08 4:52
professionalPaul Conrad4-Dec-08 4:52 
Questionplz do replay i am facing problem since last working day Pin
sajjadlashari4-Dec-08 1:12
sajjadlashari4-Dec-08 1:12 
AnswerRe: plz do replay i am facing problem since last working day Pin
meeram3954-Dec-08 1:27
meeram3954-Dec-08 1:27 
AnswerRe: plz do replay i am facing problem since last working day Pin
AhsanS4-Dec-08 1:27
AhsanS4-Dec-08 1:27 
GeneralRe: plz do replay i am facing problem since last working day Pin
sajjadlashari4-Dec-08 17:56
sajjadlashari4-Dec-08 17:56 
GeneralRe: plz do replay i am facing problem since last working day Pin
Padmanabh Ganorkar4-Dec-08 18:59
Padmanabh Ganorkar4-Dec-08 18:59 
QuestionSuggesion Required related to filling country and city Dropdownlist [modified] Pin
mr_muskurahat4-Dec-08 0:07
mr_muskurahat4-Dec-08 0:07 
AnswerRe: Suggesion Required related to filling country and city Dropdownlist Pin
meeram3954-Dec-08 0:54
meeram3954-Dec-08 0:54 
AnswerRe: Suggesion Required related to filling country and city Dropdownlist Pin
AhsanS4-Dec-08 1:30
AhsanS4-Dec-08 1:30 
QuestionBizzare ViewState issue Pin
dmartu3-Dec-08 23:21
dmartu3-Dec-08 23:21 
AnswerRe: Bizzare ViewState issue Pin
Christian Graus4-Dec-08 8:44
protectorChristian Graus4-Dec-08 8:44 
GeneralRe: Bizzare ViewState issue Pin
dmartu4-Dec-08 22:56
dmartu4-Dec-08 22:56 
Questionrepeater control Pin
madan raj3-Dec-08 22:56
madan raj3-Dec-08 22:56 

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.