How can I make runat=server unnecessary

S

SlashDrew

I have created a custom control that has some design time support. I
can create a menubar with the following HTML

<Menu:BarMenu runat="server" id="MenuBar">
<MainMenuItems>
<Menu:BarMenuItem Text="New Member" id="btnNewMember"
onclick="btnNewMember_Click" MenuTip="Click to Add a new Member" />
<Menu:BarMenuItem Text="Edit Profile" id="btnEditProfile" disabled
onclick="btnEditProfile_Click" MenuTip="Click to Edit the selected
Member's Profile" />
<Menu:BarMenuItem Text="Edit Permissions" id="btnEditPermissions"
disabled onclick="btnEditPermissions_Click" MenuTip="Click to
Approve/Revoke member permissions" />
<Menu:BarMenuItem Text="Delete Member" id="btnDeleteMember" disabled
confirm="Are you sure you want to permanently delete the selected
Member?" onclick="btnDeleteMember_Click" MenuTip="Click to permanently
Remove the Selected Member" />
</MainMenuItems>
</Menu:BarMenu>

When I build, I get parser errors saying that the runat='server'
attribute is missing from all the inner elements (i.e.,
<MainMenuItems>). Is there a way around this?
 
J

Juan T. Llibre

re:
Is there a way around this?

If you want to run your code server-side, the runat tag is indispensable.
If you don't want your code to run server-side it isn't indispensable.
 
M

Mark Rae

When I build, I get parser errors saying that the runat='server'
attribute is missing from all the inner elements (i.e.,
<MainMenuItems>). Is there a way around this?

No.
 
S

SlashDrew

Seems mighty strange considering the datagrid has nested elements that
don't require runat='server'. I'm not questioning the attribute on the
top level element (<Menu:BarMenu>), just on the nested elements
(<MainMenuItems>, etc.). There's got to be a way to not require this
in 2.0 like it wasn't in 1.1. I will find it. And then I will tell
the world. And then, you will all bow to me!!! Mwahahahah.
 
J

Juan T. Llibre

re:
And then, you will all bow to me!!! Mwahahahah.

Either that...or you'll come back with your tail between your legs.
Mwahahahah.

;-)

I definitely want to know whether you were successful or not.
Please post back the results.
 
B

bruce barker

the same way asp.net controls do. research ParseChildrenAttribute

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top