Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
89 views
Hello,

I am building  toolbar and adding toolbar buttons at runtime.  My toolbar is created in the Page_Init and the buttons are added in Page_Load.  I have an event handler that handles events when any of the buttons in the toolbar are clicked.  Everything works but I would very much like to be able to set the appearance of the toolbar buttons when they are clicked to match how they look when a mouseover occurs.  Basically, I need an indication to the user that the item is clicked.  Does anyone know if this is possible?  I have checked the support area and I did not see documentation for what I would think would be a commonly requested item.

Thanks,
Bob
Bob
Top achievements
Rank 1
 answered on 20 Sep 2010
1 answer
126 views
Hi,
I am using  telerik:RadDatePicker to open up a calander for the user and accept the date.

<telerik:RadDatePicker ID="RadDatePicker_from_date" runat="server" DateInput-ReadOnly=true AutoPostBack="false">
         <DateInput DateFormat="dd/mm/yyyy"></DateInput>
</telerik:RadDatePicker>   

Am trying to get the date in   09/11/2010 format  ( mm/dd/yyyy) , but it always come up with time like  '09/11/2010  11:00 AM'

Am trying to fix this, but couldnot find solution. Please help.

Thanks,
Mani
Manikandan Balasubramaniyan
Top achievements
Rank 1
 answered on 20 Sep 2010
5 answers
136 views
Summary: How do I get the RadContextMenu to function in an RTL manner when generating it from code?

I have seen many references on the forums regarding creating a RadMenu (RadContextMenu) by adding dir='rtl' to the <RadContextMenu> tab in your .aspx page.

I assume that is how the control knows how to output the proper CSS classes, i.e:
<div id="RadMenu1" class="RadMenu RadMenu_Vista RadMenu_rtl RadMenu_Vista_rtl" dir="rtl">
My ContextMenu is being generated in code via something like:
contextMenu = new RadContextMenu { EnableOverlay = true, ClickToOpen = true };

I have tried using code like the following, but the '_rtl' CSS classes are not output:
contextMenu.Attributes.Add("dir", "rtl");

What is the proper way to do this?

Thank you,
Kevin
Veronica
Telerik team
 answered on 20 Sep 2010
2 answers
236 views
Please forgive me if this has already been addressed, but I believe I have found an issue with the RadNumericTextbox when specific ranges are involved.

The following is a simple mockup of the issue:
<html>
    <head>
        <script language="javascript" type="text/javascript">
            function RequireField(source, args) {
                if (args.Value == '') {
                    args.IsValid = false;
                }
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="ScriptManager" runat="server"></telerik:RadScriptManager>
            <b>Temp(°C):</b><telerik:RadNumericTextBox ID="Temp" Width="100px" NumberFormat-DecimalDigits="1" AllowOutOfRangeAutoCorrect="false"
                runat="server" MaxLength="5" MinValue="30" MaxValue="42">
            </telerik:RadNumericTextBox>
            <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="RequireField"
                ControlToValidate="Temp" ValidateEmptyText="true" ErrorMessage="Temperature is required and must be between 30 and 42"
                Display="None" ValidationGroup="SendValidationGroup"></asp:CustomValidator>
            <br /><br />
            <asp:Button ID="FormPost" runat="server" Text="Post Back" ValidationGroup="SendValidationGroup" />
 
            <asp:ValidationSummary EnableClientScript="true" ShowMessageBox="true" ShowSummary="false" ID="validationSummary" ValidationGroup="SendValidationGroup"
                runat="server" />
        </form>
    </body>
</html>

Values greater than 42 should not be allowed, however, when entering '400' the form submits and a value of '40' is sent to the custom validator's javascript function.

My assumption is that while typing 400, you obviously type 40 first and this value is then stored in the hidden field state somewhere.  However, this value is not cleared upon adding more zeros to '40'

If I clear the textbox, the hidden field state correctly passes an empty string to the validation function.

Please let me know if there is something simple that I am missing.

Regards,
Chris
Dev LIPIX
Top achievements
Rank 1
 answered on 20 Sep 2010
0 answers
41 views
Hello,

I have a RadGrid that I'm attempting to use in form editing on. I'm currently using the following GridTemplateColumn. The problem is that what I really need is an InsertItemTemplate like what asp:DetailsView has. This is because I want the Status field to be editable in a RadComboBox on insert, but, non-editable and displayed in a label on edit. Does anyone know if this is possible in RadGrid? I'm assuming that I'll probably have to handle an event and adjust the visibility of fields based on whether it's in insert or edit mode? The problem is that I don't know what event I should use to do this and I also don't know how to lookup the control. I'm assuming I'll probably have to use FindControl() and maybe use the RowIndex to find the proper row in the grid or something. Any help would be greatly appreciated.

Jon

Jon
Top achievements
Rank 1
 asked on 20 Sep 2010
0 answers
50 views
Hello,

I have a RadGrid that I'm attempting to use in form editing on. I'm currently using the following GridTemplateColumn. The problem is that what I really need is an InsertItemTemplate like what asp:DetailsView has. This is because I want the Status field to be editable in a RadComboBox on insert, but, non-editable and displayed in a label on edit. Does anyone know if this is possible in RadGrid? I'm assuming that I'll probably have to handle an event and adjust the visibility of fields based on whether it's in insert or edit mode? The problem is that I don't know what event I should use to do this and I also don't know how to lookup the control. I'm assuming I'll probably have to use FindControl() and maybe use the RowIndex to find the proper row in the grid or something. Any help would be greatly appreciated.

 

 

 

<asp:TemplateField HeaderText="Status" SortExpression="Status">
                    <EditItemTemplate>
                        <asp:DropDownList ID="DropDownList1" runat="server" SelectedValue='<%# Bind("Status") %>'>
                            <asp:ListItem Text="" Value=""></asp:ListItem>
                            <asp:ListItem Text="Assigned" Value="Assigned"></asp:ListItem>
                            <asp:ListItem Text="Lost" Value="Lost"></asp:ListItem>
                            <asp:ListItem Text="Returned" Value="Returned"></asp:ListItem>
                        </asp:DropDownList>
                        <%--<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Status") %>'></asp:TextBox>--%>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Status") %>'></asp:TextBox>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Status") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>


Jon

Jon
Top achievements
Rank 1
 asked on 20 Sep 2010
1 answer
38 views
Hi Telerik Team,

I have a editor with a Label tag as its content.
when i navigate from DESIGN view to HTML mode.
i can see the tag like this
<label class="CMS40FaqContentArea001" id="CMS40FaqContentArea001" style="padding-right: 5px;  padding-left: 20px; font-weight: bold; background: url(../images/widgets_sml/faqcontentarea.png) #cccccc no-repeat left center;   height: 20px; text-align: right;border: #000000 1px dotted;" runat="server" name="FaqContentArea">FAQ CONTROL</label>

but when i drag and drop the Label tag some where around the editor, then if i see the HTML mode i see Runat="server" attribute missing may i know what is this problem and how can i fix it....

<label style="padding-right: 5px;  padding-left: 20px; font-weight: bold; background: url(../images/widgets_sml/faqcontentarea.png) #cccccc no-repeat left center;   height: 20px; text-align: right;border: #000000 1px dotted;" class="CMS40FaqContentArea001" name="FaqContentArea" id="CMS40FaqContentArea001">FAQ CONTROL</label>



plzz replay aspd...

Thanks
K²
Rumen
Telerik team
 answered on 20 Sep 2010
1 answer
67 views
Hi Telerik team,

Plzz see the image i have attached

Thanks
K²
Rumen
Telerik team
 answered on 20 Sep 2010
1 answer
74 views
Hi Telerik Team,

I have a editor with a Label tag as its content.
when i navigate from DESIGN view to HTML mode.
i can see the tag like this
<label class="CMS40FaqContentArea001" id="CMS40FaqContentArea001" style="padding-right: 5px;  padding-left: 20px; font-weight: bold; background: url(../images/widgets_sml/faqcontentarea.png) #cccccc no-repeat left center;   height: 20px; text-align: right;border: #000000 1px dotted;" runat="server" name="FaqContentArea">FAQ CONTROL</label>

but when i drag and drop the Label tag some where around the editor, then if i see the HTML mode i see Runat="server" attribute missing may i know what is this problem and how can i fix it....

<label style="padding-right: 5px;  padding-left: 20px; font-weight: bold; background: url(../images/widgets_sml/faqcontentarea.png) #cccccc no-repeat left center;   height: 20px; text-align: right;border: #000000 1px dotted;" class="CMS40FaqContentArea001" name="FaqContentArea" id="CMS40FaqContentArea001">FAQ CONTROL</label>



plzz replay aspd...

Thanks
K²
Rumen
Telerik team
 answered on 20 Sep 2010
0 answers
299 views
Hi Telerik,

I am using radmenu control in my website which has 3 items namely podium,office and the forum as the top navigation items.all the top navigation items have subitems with different font,color,background image.

I want to change the rmSlide class for each top navigation item.So that Podium  uses rmSlide,The Office uses rmSlide1 and The forum to uses rmSlide2.

all the 3 dropdown has diffrent bg example podium(pink),office(blue) and the forum(brown).

So Please help me to solve this issue.

ACCX
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="QatarRadMenuBar.ascx.cs"
    Inherits="UserControls_QatarRadMenuBar" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false"
    StartFromCurrentNode="false" StartingNodeOffset="1" />
<telerik:RadMenu runat="server" ID="menuTopNavigation">
    <DefaultGroupSettings RepeatColumns="2"  RepeatDirection="Horizontal" Height="259px" Width="159px"  />   
</telerik:RadMenu>


ASCX.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.Web.UI;
using Telerik.Cms.Web;
using System.Threading;
 
public partial class UserControls_QatarRadMenuBar : System.Web.UI.UserControl
{
    private string strLiStartMain = "<li class='firstLevel'>";
    private string strLiStartFirst = "<li class='secondLevel'>";
    private string strLiStartMainSelected = "<li class='firstLevelSelected'>";
    private string strLiStartFirstSelected = "<li class='secondLevelSelected'>";
 
    private string strLiStartMain1 = "<li class='firstLevel1'>";
    private string strLiStartFirst1 = "<li class='secondLevel1'>";
    private string strLiStartMainSelected1 = "<li class='firstLevelSelected1'>";
    private string strLiStartFirstSelected1 = "<li class='secondLevelSelected1'>";
 
    private string strEndLi = "</li>";
    private string strEndUl = "</ul>";
    private string strLiNextLevelSelected = string.Empty;
    private string strLiStartSecond = string.Empty;
    private string strUlStartMain = string.Empty;
    private string strUlStartSecond = string.Empty;
    private string strUlStartMainRight = string.Empty;
    private string strUlStartSecondRight = string.Empty;
 
 
 
    private string strLiNextLevelSelected1 = string.Empty;
    private string strLiStartSecond1 = string.Empty;
    private string strUlStartMain1 = string.Empty;
    private string strUlStartSecond1 = string.Empty;
    private string strUlStartMainRight1 = string.Empty;
    private string strUlStartSecondRight1 = string.Empty;
 
    protected void Page_Load(object sender, EventArgs e)
    {
        BuildQPMenu();
    }
 
    private void BuildQPMenu()
    {
        if (Resources.GlobalResource.Direction.ToUpper() == "RTL")
        {
            strLiNextLevelSelected = "<li style='padding-right:{0}px;background-position:{1}px center;' class='nextLevelSelected'>";
            strLiStartSecond = "<li style='padding-right:{0}px;background-position:{1}px center;' class='nextLevel'>";
            strUlStartMain = "<ul style='list-style: none; margin: 0;padding: 0 8px 0 30px;' class='levelBorder'>";
            strUlStartSecond = "<ul style='list-style: none; margin: 0;padding: 8px 10px 0 30px;' class='levelBorder'>";
 
            strUlStartMainRight = "<ul style='list-style: none; margin: 0;padding: 0 8px 0 30px;'>";
            strUlStartSecondRight = "<ul style='list-style: none; margin: 0;padding: 8px 10px 0 30px;'>";
 
        }
        else
        {
            strLiNextLevelSelected = "<li style='padding-left:{0}px;background-position:{1}px center;' class='nextLevelSelected'>";
            strLiStartSecond = "<li style='padding-left:{0}px;background-position:{1}px center;' class='nextLevel'>";
            strUlStartMain = "<ul style='list-style: none; margin: 0;padding: 0 30px 0 6px;' class='levelBorder'>";
            strUlStartSecond = "<ul style='list-style: none; margin: 0;padding: 0px 30px 0 6px;' class='levelBorder'>";
            strUlStartMainRight = "<ul style='list-style: none; margin: 0;padding: 0 30px 0 6px;' class='levelBorder'>";
            strUlStartSecondRight = "<ul style='list-style: none; margin: 0;padding: 0px 30px 0 6px;' >";
 
 
            strLiNextLevelSelected1 = "<li style='padding-left:{0}px;background-position:{1}px center;' class='nextLevelSelected1'>";
            strLiStartSecond1 = "<li style='padding-left:{0}px;background-position:{1}px center;' class='nextLevel1'>";
            strUlStartMain1 = "<ul style='list-style: none; margin: 0;padding: 0 30px 0 6px;' class='levelBorder1'>";
            strUlStartSecond1 = "<ul style='list-style: none; margin: 0;padding: 0px 30px 0 6px;' class='levelBorder1'>";
            strUlStartMainRight1 = "<ul style='list-style: none; margin: 0;padding: 0 30px 0 6px;' class='levelBorder1'>";
            strUlStartSecondRight1 = "<ul style='list-style: none; margin: 0;padding: 0px 30px 0 6px;' >";
 
        }
        menuTopNavigation.Items.Clear();
        SiteMapNodeCollection topNodecollection = SiteMapDataSource1.Provider.GetChildNodes(SiteMapDataSource1.Provider.RootNode);
        if (topNodecollection.Count > 0)
        {
            string numbers = "";
            foreach (SiteMapNode toplevel in topNodecollection[0].ChildNodes)//topNodecollection[0] is [SiteMap]
            {
                RadMenuItem itemtoplevel = new RadMenuItem(toplevel.Title.ToUpper(), this.ResolveUrl(toplevel.Url));               
                if (toplevel.Url.Contains("Podium"))
                {
                    itemtoplevel.GroupSettings.RepeatColumns = 4;
                    itemtoplevel.Text= "<span style='font-size:10px;'>THE</span> Podium";
                    numbers = "";
                }
                else if (toplevel.Url.Contains("Office"))
                {
                    itemtoplevel.GroupSettings.RepeatColumns = 5;
                    itemtoplevel.Text = "<span style='font-size:10px;'>THE</span> Office";
                    numbers = "1";
                }
                else if (toplevel.Url.Contains("Forum"))
                {
                    itemtoplevel.GroupSettings.RepeatColumns = 1;
                    itemtoplevel.Text = "<span style='font-size:10px;'>THE</span> Forum";
                    numbers = "2";
                }
                menuTopNavigation.Items.Add(itemtoplevel);
                if (HttpContext.Current.Request.FilePath.ToUpper().Contains(itemtoplevel.NavigateUrl.ToUpper().Replace(".ASPX", "")))
                {
                    itemtoplevel.CssClass = "RadTopLevelItemSelected";
                   
                }
                if (toplevel.HasChildNodes)
                {
                    int secondlevelcount = 0;
                    foreach (SiteMapNode secondlevel in toplevel.ChildNodes)
                    {
                        if (UserHasPermission(secondlevel))
                        {
                            RadMenuItem itemsecondlevel = new RadMenuItem();
                            //itemsecondlevel.Width = Unit.Pixel(222);
                            LiteralControl liUlStart = null;
 
                            if (secondlevelcount < menuTopNavigation.DefaultGroupSettings.RepeatColumns)// only for first items for RepeatColumns add top padding
                            {
                                if (secondlevelcount == 0 || (secondlevelcount % 2 == 0))
                                {
                                    if (toplevel.ChildNodes.Count >= menuTopNavigation.DefaultGroupSettings.RepeatColumns)
                                    {
                                        if (numbers == "1")
                                        {
                                            liUlStart = GetLiteralControl(strUlStartMain1);
                                        }
                                        else
                                        {
 
                                            liUlStart = GetLiteralControl(strUlStartMain);
                                        }
                                    }
                                    else
                                    {
                                        if (numbers == "1")
                                        {
                                            liUlStart = GetLiteralControl(strUlStartMainRight1);
                                        }
                                        else
                                        {
                                            liUlStart = GetLiteralControl(strUlStartMainRight);
                                        }
                                    }
                                }
                                else
                                {
                                    if (numbers == "1")
                                    {
                                        liUlStart = GetLiteralControl(strUlStartMainRight1);
                                    }
                                    else
                                    {
                                        liUlStart = GetLiteralControl(strUlStartMainRight);
                                    }
                                }
 
                            }
                            else
                            {
                                if (secondlevelcount == 0 || (secondlevelcount % 2 == 0))
                                {
                                    if (toplevel.ChildNodes.Count >= menuTopNavigation.DefaultGroupSettings.RepeatColumns)
                                    {
                                        if (numbers == "1")
                                        {
                                            liUlStart = GetLiteralControl(strUlStartSecond1);
                                        }
                                        else
                                        {
                                            liUlStart = GetLiteralControl(strUlStartSecond);
                                        }
                                    }
                                    else
                                    {
                                        if (numbers == "1")
                                        {
                                            liUlStart = GetLiteralControl(strUlStartMainRight1);
                                        }
                                        else
                                        {
                                            liUlStart = GetLiteralControl(strUlStartMainRight);
                                        }
                                    }
                                }
                                else
                                {
                                    if (numbers == "1")
                                    {
                                        liUlStart = GetLiteralControl(strUlStartSecondRight1);
                                    }
                                    else
                                    {
                                        liUlStart = GetLiteralControl(strUlStartSecondRight);
                                    }
                                }
 
                            }
 
                            itemsecondlevel.Controls.Add(liUlStart);
                            if (HttpContext.Current.Request.FilePath.ToUpper().Contains(this.ResolveUrl(secondlevel.Url).ToUpper().Replace(".ASPX", "")))
                            {
                                if (numbers == "1")
                                {
                                    itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartMainSelected1));
                                }
                                else
                                {
                                    itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartMainSelected));
                                }
                            }
                            else
                            {
                                if (numbers == "1")
                                {
                                    itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartMain1));
                                }
                                else
                                {
                                    itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartMain));
                                }
                            }
                            itemsecondlevel.Controls.Add(GetNavigatingHyperlink(secondlevel.Key, secondlevel.Title, secondlevel.Url));
                            itemsecondlevel.Controls.Add(GetLiteralControl(strEndLi));
 
                            if (secondlevel.HasChildNodes)
                            {
                                foreach (SiteMapNode thirdlevel in secondlevel.ChildNodes)
                                {
                                    if (UserHasPermission(thirdlevel))
                                    {
                                        if (HttpContext.Current.Request.FilePath.ToUpper().Contains(this.ResolveUrl(thirdlevel.Url).ToUpper().Replace(".ASPX", "")))
                                        {
                                            if (numbers == "1")
                                            {
                                                itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartFirstSelected1));
                                            }
                                            else
                                            {
                                                itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartFirstSelected));
                                            }
                                        }
                                        else if (thirdlevel.HasChildNodes)
                                        {
                                            if (HttpContext.Current.Request.FilePath.ToUpper().Contains(this.ResolveUrl(thirdlevel.Url.Substring(0, thirdlevel.Url.LastIndexOf("/"))).ToUpper().Replace(".ASPX", "")))
                                            {
                                                if (numbers == "1")
                                                {
                                                    itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartFirstSelected1));
                                                }
                                                else
                                                {
                                                    itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartFirstSelected));
                                                }
                                            }
                                            else
                                            {
                                                if (numbers == "1")
                                                {
                                                    itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartFirst1));
                                                }
                                                else
                                                {
                                                    itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartFirst));
                                                }
                                            }
                                        }
                                        else
                                        {
                                            if (numbers == "1")
                                            {
                                                itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartFirst1));
                                            }
                                            else
                                            {
                                                itemsecondlevel.Controls.Add(GetLiteralControl(strLiStartFirst));
                                            }
                                        }
                                        itemsecondlevel.Controls.Add(GetNavigatingHyperlink(thirdlevel.Key, thirdlevel.Title, thirdlevel.Url));
                                        itemsecondlevel.Controls.Add(GetLiteralControl(strEndLi));
                                        if (thirdlevel.HasChildNodes)
                                        {
                                            AddNextLevels(ref itemsecondlevel, thirdlevel, 0,numbers);
                                        }
                                    }
                                }
                            }
                            itemsecondlevel.Controls.Add(GetLiteralControl(strEndUl));
                            itemtoplevel.Items.Add(itemsecondlevel);
                            secondlevelcount++;
                        }
                    }
                }
            }
        }
    }
    private bool UserHasPermission(SiteMapNode node)
    {
        return node.IsAccessibleToUser(HttpContext.Current);
    }
    private void AddNextLevels(ref RadMenuItem itemsecondlevel, SiteMapNode nextLevelNode, int count,string numbers)
    {
        LiteralControl liStart = null;
        foreach (SiteMapNode currentNode in nextLevelNode.ChildNodes)
        {
            if (UserHasPermission(currentNode))
            {
 
 
                if (Resources.GlobalResource.Direction.ToUpper() == "RTL")
                {
                    if (HttpContext.Current.Request.FilePath.ToUpper().Contains(this.ResolveUrl(currentNode.Url).ToUpper().Replace(".ASPX", "")))
                    {
                        if (numbers == "1")
                        {
 
                            liStart = GetLiteralControl(string.Format(strLiNextLevelSelected1, 40 + (10 * count), 144 - (10 * count)));
                        }
                        else
                        {
                            liStart = GetLiteralControl(string.Format(strLiNextLevelSelected, 40 + (10 * count), 144 - (10 * count)));
                        }
 
                    }
                    else
                    {
                        if (numbers == "1")
                        {
                            liStart = GetLiteralControl(string.Format(strLiStartSecond1, 40 + (10 * count), 144 - (10 * count)));
                        }
                        else
                        {
                            liStart = GetLiteralControl(string.Format(strLiStartSecond, 40 + (10 * count), 144 - (10 * count)));
                        }
                    }
                }
                else
                {
                    if (HttpContext.Current.Request.FilePath.ToUpper().Contains(this.ResolveUrl(currentNode.Url).ToUpper().Replace(".ASPX", "")))
                    {
                        if (numbers == "1")
                        {
                            liStart = GetLiteralControl(string.Format(strLiNextLevelSelected1, 30 + (10 * count), 22 + (10 * count)));
                        }
                        else
                        {
                            liStart = GetLiteralControl(string.Format(strLiNextLevelSelected, 30 + (10 * count), 22 + (10 * count)));
                        }
 
                    }
                    else
                    {
                        if (numbers == "1")
                        {
                            liStart = GetLiteralControl(string.Format(strLiStartSecond1, 30 + (10 * count), 22 + (10 * count)));
                        }
                        else
                        {
                            liStart = GetLiteralControl(string.Format(strLiStartSecond, 30 + (10 * count), 22 + (10 * count)));
                        }
                    }
                }
                itemsecondlevel.Controls.Add(liStart);
                itemsecondlevel.Controls.Add(GetNavigatingHyperlink(currentNode.Key, currentNode.Title, currentNode.Url));
                itemsecondlevel.Controls.Add(GetLiteralControl(strEndLi));
                if (currentNode.HasChildNodes)
                {
                    count++;
                    AddNextLevels(ref itemsecondlevel, currentNode, count,numbers);
                }
            }
        }
    }
 
    private LiteralControl GetLiteralControl(string text)
    {
        return new LiteralControl(text);
    }
 
    private HyperLink GetNavigatingHyperlink(string key, string text, string navigatingUrl)
    {
        HyperLink hlNavigator = new HyperLink();
        hlNavigator.ID = key;
        hlNavigator.NavigateUrl = navigatingUrl;
        hlNavigator.Text = text;
        return hlNavigator;
    }
 
}


ravi shankar
Top achievements
Rank 1
 asked on 20 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?