Default Console Object
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Default Console Object

 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server
Author Message
Duran
Guest





Posted: Thu Jan 06, 2005 4:53 am    Post subject: Default Console Object Reply with quote

Is there a way to access the default console object in a
template's code behind? I've noticed that when I drag a
default console on a template page it doens't create an
object reference in the code behind for the object. For
example
Microsoft.ContentManagement.WebControls.ConsoleControls.De
faultConsole...

Is there a way to get to that object?

Thanks!
Back to top
Mei Ying [MVP]
Guest





Posted: Thu Jan 06, 2005 9:57 am    Post subject: Default Console Object Reply with quote

Yes, there is - here's some code that may help:

protected
Microsoft.ContentManagement.WebControls.ConsoleControls.Con
sole DefaultConsole1;

private void Page_Load(object sender,
System.EventArgs e)
{
//accessing the console's
properties
string clientID = DefaultConsole1.ClientID;
}

regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Contact: meiyinglim@hotmail.com
---
Quote:
-----Original Message-----
Is there a way to access the default console object in a
template's code behind? I've noticed that when I drag a
default console on a template page it doens't create an
object reference in the code behind for the object. For
example
Microsoft.ContentManagement.WebControls.ConsoleControls.De
faultConsole...

Is there a way to get to that object?

Thanks!
.
Back to top
Duran
Guest





Posted: Fri Jan 07, 2005 5:11 am    Post subject: Default Console Object Reply with quote

Thanks,
One more question, I get an error when I do that
declaration...

Parser Error
Description: An error occurred during the parsing of a
resource required to service this request. Please review
the following specific parse error details and modify
your source file appropriately.

Parser Error Message: The base class includes the
field 'DefaultConsole1', but its type
(Microsoft.ContentManagement.WebControls.ConsoleControls.C
onsole) is not compatible with the type of control
(ASP.DefaultConsole_ascx).

Source Error

Any Ideas?

Thanks!


Quote:
-----Original Message-----
Yes, there is - here's some code that may help:

protected
Microsoft.ContentManagement.WebControls.ConsoleControls.C
on
sole DefaultConsole1;

private void Page_Load(object sender,
System.EventArgs e)
{
//accessing the console's
properties
string clientID = DefaultConsole1.ClientID;
}

regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Contact: meiyinglim@hotmail.com
---
-----Original Message-----
Is there a way to access the default console object in
a
template's code behind? I've noticed that when I drag
a
default console on a template page it doens't create an
object reference in the code behind for the object.
For
example
Microsoft.ContentManagement.WebControls.ConsoleControls.
De
faultConsole...

Is there a way to get to that object?

Thanks!
.

.
Back to top
Mei Ying [MVP]
Guest





Posted: Fri Jan 07, 2005 7:50 am    Post subject: Default Console Object Reply with quote

You're absolutely right, I didn't test the code I posted
earlier, so it's completely rubbish. My apologies...

Here's the corrected, tested and working code:

protected MyNamespace.Console.DefaultConsole
DefaultConsole1;

private void Page_Load(object sender,
System.EventArgs e)
{
// Put user code to initialize the
page here
Response.Write
(DefaultConsole1.ClientID);
}

Replace "MyNamespace" with the namespace of your
application.

regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Contact: meiyinglim@hotmail.com
---

Quote:
-----Original Message-----
Thanks,
One more question, I get an error when I do that
declaration...

Parser Error
Description: An error occurred during the parsing of a
resource required to service this request. Please review
the following specific parse error details and modify
your source file appropriately.

Parser Error Message: The base class includes the
field 'DefaultConsole1', but its type
(Microsoft.ContentManagement.WebControls.ConsoleControls.C
onsole) is not compatible with the type of control
(ASP.DefaultConsole_ascx).

Source Error

Any Ideas?

Thanks!


-----Original Message-----
Yes, there is - here's some code that may help:

protected
Microsoft.ContentManagement.WebControls.ConsoleControls.C
on
sole DefaultConsole1;

private void Page_Load(object sender,
System.EventArgs e)
{
//accessing the console's
properties
string clientID = DefaultConsole1.ClientID;
}

regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Contact: meiyinglim@hotmail.com
---
-----Original Message-----
Is there a way to access the default console object in
a
template's code behind? I've noticed that when I drag
a
default console on a template page it doens't create an
object reference in the code behind for the object.
For
example
Microsoft.ContentManagement.WebControls.ConsoleControls.
De
faultConsole...

Is there a way to get to that object?

Thanks!
.

.

.
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB