D
Dessip
Hey,
Soryr to post this, but im getting amasingly confused from all of the
information out there, but i was wondering if some one could help me
with these 2 questions please, because they would imporve the quality
of my code alot.
1/ Is there any way that you can edit the <head> tag, because some of
my Class's have functions in there that are controled by JavaScript or
VBScript, (Address Book being a excellent example), and also i would
like to write my class's so that they can place a Link to a stylesheet
(If one exists) else jsut write a defualt style to the head (Thou i
guess a better way, might be to get it to look for the stylesheet, and
if it dont exists build a dummy one, and store it to the web server,
but still is it possible to write to the head please
2/ In a class is there any way that you can use the page that called
it without having to do something like this:
c#:
public ClassName(System.Web.UI.Page oPage)
{
oPage.Controls.Add(MyControl);
}
VB.NET:
Public Sub New(oPage as System.Web.UI.Page)
oPage.Controls.Add(MyControl)
End Sub
Instead i would like to do something like this:
C#:
public ClassName()
{
PageThatIsUsed.Controls.Add(MyControl);
}
VB.Net:
Public Sub New()
PageThatIsUsed.Controls.Add(MyControl)
End Sub
As you can see with that one, i wont ahve to get the user to specify
the page, it will default go to the page that is called.
Regards
CDove
Soryr to post this, but im getting amasingly confused from all of the
information out there, but i was wondering if some one could help me
with these 2 questions please, because they would imporve the quality
of my code alot.
1/ Is there any way that you can edit the <head> tag, because some of
my Class's have functions in there that are controled by JavaScript or
VBScript, (Address Book being a excellent example), and also i would
like to write my class's so that they can place a Link to a stylesheet
(If one exists) else jsut write a defualt style to the head (Thou i
guess a better way, might be to get it to look for the stylesheet, and
if it dont exists build a dummy one, and store it to the web server,
but still is it possible to write to the head please
2/ In a class is there any way that you can use the page that called
it without having to do something like this:
c#:
public ClassName(System.Web.UI.Page oPage)
{
oPage.Controls.Add(MyControl);
}
VB.NET:
Public Sub New(oPage as System.Web.UI.Page)
oPage.Controls.Add(MyControl)
End Sub
Instead i would like to do something like this:
C#:
public ClassName()
{
PageThatIsUsed.Controls.Add(MyControl);
}
VB.Net:
Public Sub New()
PageThatIsUsed.Controls.Add(MyControl)
End Sub
As you can see with that one, i wont ahve to get the user to specify
the page, it will default go to the page that is called.
Regards
CDove