Click here to Skip to main content
15,908,264 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionTitle problem Pin
krishnaveer10-Sep-08 2:36
krishnaveer10-Sep-08 2:36 
AnswerRe: Title problem Pin
Pete O'Hanlon10-Sep-08 2:52
mvePete O'Hanlon10-Sep-08 2:52 
AnswerRe: Title problem Pin
Christian Graus10-Sep-08 6:17
protectorChristian Graus10-Sep-08 6:17 
GeneralRe: Title problem Pin
Steven A. Lowe12-Sep-08 18:44
Steven A. Lowe12-Sep-08 18:44 
Questioncan i set navigateurl for swf file through vs 2003 Pin
natureabc10-Sep-08 1:56
natureabc10-Sep-08 1:56 
QuestionHow to use SID Like Windows authentication User? Pin
Piyush Vardhan Singh10-Sep-08 1:37
Piyush Vardhan Singh10-Sep-08 1:37 
GeneralDeclarative Property Collections Pin
Brady Kelly10-Sep-08 1:04
Brady Kelly10-Sep-08 1:04 
GeneralRe: Declarative Property Collections Pin
J4amieC10-Sep-08 2:08
J4amieC10-Sep-08 2:08 
using the PersistanceModeAttribute

I have a button in my app which works like a menu. ie, when you click it it pops up a menu of items.

I have a MenuItem defined:

public class MenuItem
{
    public string Text { get; set; }
    public string CommandName { get; set; }
    public string CommandArgument { get; set; }
}


and on my Control I define the property like this:

private List<menuitem> items;

[PersistenceMode(PersistenceMode.InnerDefaultProperty)]
public List<menuitem> Items
{
    get
    {
        if (this.items == null)
            this.items = new List<menuitem>();
        return this.items;
    }
}</menuitem></menuitem></menuitem>


now my markup looks like this:

<sb:MenuButtonControl ID="mbAdd" runat="server" OnCommand="Add_Command">
     <sb:MenuItem CommandName="Add" Text="Add New" />
     <sb:MenuItem CommandName="Search" Text="Add Existing" />
</sb:MenuButtonControl>


the only other thing I do is override CreateChildControls on my main control and physically create my controls from the list of MenuItems (in my case I create LinkButton's for each menuItem and add them to the ControlsCollection )
GeneralRe: Declarative Property Collections Pin
Brady Kelly10-Sep-08 2:52
Brady Kelly10-Sep-08 2:52 
GeneralRe: Declarative Property Collections Pin
J4amieC10-Sep-08 3:16
J4amieC10-Sep-08 3:16 
GeneralTab Control with MultiView and Menu Pin
Brady Kelly10-Sep-08 0:47
Brady Kelly10-Sep-08 0:47 
Questiondeploy website to server Pin
eyeseetee10-Sep-08 0:24
eyeseetee10-Sep-08 0:24 
AnswerRe: deploy website to server Pin
AhsanS10-Sep-08 0:27
AhsanS10-Sep-08 0:27 
GeneralRe: deploy website to server Pin
eyeseetee10-Sep-08 0:38
eyeseetee10-Sep-08 0:38 
GeneralRe: deploy website to server Pin
Gamzun10-Sep-08 20:06
Gamzun10-Sep-08 20:06 
QuestionValidaion Pin
mpavas10-Sep-08 0:23
mpavas10-Sep-08 0:23 
AnswerRe: Validaion Pin
AhsanS10-Sep-08 0:29
AhsanS10-Sep-08 0:29 
GeneralRe: Validaion Pin
mpavas10-Sep-08 1:33
mpavas10-Sep-08 1:33 
Questioni need help , abt text box [modified] Pin
Member 465900110-Sep-08 0:04
Member 465900110-Sep-08 0:04 
AnswerRe: Navaneeth sir as we discussed ,abt text box Pin
eyeseetee10-Sep-08 0:15
eyeseetee10-Sep-08 0:15 
GeneralRe: Navaneeth sir as we discussed ,abt text box Pin
Member 465900110-Sep-08 1:03
Member 465900110-Sep-08 1:03 
GeneralRe: Navaneeth sir as we discussed ,abt text box Pin
Venkat Eswaran12-Sep-08 8:36
Venkat Eswaran12-Sep-08 8:36 
QuestionHow to take textbox value in javascript Pin
kishorg19-Sep-08 23:44
kishorg19-Sep-08 23:44 
AnswerRe: How to take textbox value in javascript Pin
Manas Bhardwaj9-Sep-08 23:51
professionalManas Bhardwaj9-Sep-08 23:51 
GeneralRe: How to take textbox value in javascript Pin
kishorg110-Sep-08 0:03
kishorg110-Sep-08 0:03 

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.