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

ASP.NET

 
AnswerRe: about .net treeview Pin
minhpc_bk5-Jan-07 16:46
minhpc_bk5-Jan-07 16:46 
GeneralRe: about .net treeview Pin
SwaSubhaVijju5-Jan-07 17:35
SwaSubhaVijju5-Jan-07 17:35 
GeneralRe: about .net treeview Pin
minhpc_bk5-Jan-07 21:17
minhpc_bk5-Jan-07 21:17 
GeneralRe: about .net treeview Pin
Vasudevan Deepak Kumar5-Jan-07 22:04
Vasudevan Deepak Kumar5-Jan-07 22:04 
QuestionDropdown List width Pin
kalyan.n@dsolusys.com5-Jan-07 10:15
kalyan.n@dsolusys.com5-Jan-07 10:15 
AnswerRe: Dropdown List width Pin
MD125-Jan-07 18:11
MD125-Jan-07 18:11 
QuestionRe: Dropdown List width Pin
Venkatesh Mookkan7-Jan-07 16:27
Venkatesh Mookkan7-Jan-07 16:27 
QuestionDynamic menu items not triggering "Click" event Pin
Xpnctoc5-Jan-07 8:44
Xpnctoc5-Jan-07 8:44 
Here's the 30,000-ft. view: I wrapped an asp:Menu control in an ascx control. When I try to dynamically populate the menu in the ascx control, the items appear, but clicking on them fails to trigger the MenuItemClick event handler. However, if I statically declare the menu items in the .ascx page, everything is fine. Any ideas?

Here's the details:

My ascx page:

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="TabStrip.ascx.vb" Inherits="TabStrip" %>
<asp:Menu runat='server' ID='muStrip' orientation='horizontal'>
</asp:Menu>

Code in my ascx.vb file:

...
Public Sub AddItem(ByVal sText As String, ByVal bSelected As Boolean)
If (bSelected) Then
For i As Integer = 0 To muStrip.Items.Count - 1
muStrip.Items(i).Selected = False
Next
End If
Dim mui As New MenuItem(sText)
mui.Selectable = True
mui.Selected = bSelected
muStrip.Items.Add(mui)
End Sub

Protected Sub muStrip_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles muStrip.MenuItemClick
' Raise user event handler.
RaiseEvent ItemClick(sender, e, miSelectedItem)
End Sub
...


Code in my calling-page .vb file:

...
Protected Overrides Sub HandlePageLoad()
MyBase.HandlePageLoad()

' Populate the tab strip.
If Not Page.IsPostBack Then
oxiTab.AddItem("&nbsp;&nbsp;Administrative", True)
oxiTab.AddItem("&nbsp;&nbsp;Maintenance", False)
oxiTab.AddItem("&nbsp;&nbsp;Tests/Requests", False)
oxiTab.AddItem("&nbsp;&nbsp;Reports", False)
End If
End Sub
...

If I put a breakpoint at the "RaiseEvent" call and try clicking on any menu item, I never reach the breakpoint. But if I add static menu items in the ascx page, the breakpoint IS reached.

Thanks.
AnswerRe: Dynamic menu items not triggering "Click" event Pin
Colin Angus Mackay5-Jan-07 15:30
Colin Angus Mackay5-Jan-07 15:30 
GeneralRe: Dynamic menu items not triggering "Click" event Pin
Xpnctoc7-Jan-07 11:07
Xpnctoc7-Jan-07 11:07 
QuestionPosting in asp.net Pin
matsnas5-Jan-07 8:41
matsnas5-Jan-07 8:41 
AnswerRe: Posting in asp.net Pin
Pradipta Basu5-Jan-07 9:05
Pradipta Basu5-Jan-07 9:05 
AnswerRe: Posting in asp.net Pin
Venkatesh Mookkan7-Jan-07 16:37
Venkatesh Mookkan7-Jan-07 16:37 
QuestionRegisterStartupScript via Ajax / Atlas Pin
Malcolm Smart5-Jan-07 5:35
Malcolm Smart5-Jan-07 5:35 
AnswerRe: RegisterStartupScript via Ajax / Atlas Pin
Not Active5-Jan-07 6:10
mentorNot Active5-Jan-07 6:10 
GeneralRe: RegisterStartupScript via Ajax / Atlas Pin
Malcolm Smart5-Jan-07 12:11
Malcolm Smart5-Jan-07 12:11 
AnswerRe: RegisterStartupScript via Ajax / Atlas Pin
minhpc_bk6-Jan-07 4:50
minhpc_bk6-Jan-07 4:50 
GeneralRe: RegisterStartupScript via Ajax / Atlas Pin
Malcolm Smart7-Jan-07 9:11
Malcolm Smart7-Jan-07 9:11 
AnswerRe: RegisterStartupScript via Ajax / Atlas Pin
Malcolm Smart8-Jan-07 1:42
Malcolm Smart8-Jan-07 1:42 
GeneralASP.NET cannot read GAC even though has full access Pin
Ed.Poore5-Jan-07 5:32
Ed.Poore5-Jan-07 5:32 
GeneralRe: ASP.NET cannot read GAC even though has full access Pin
ednrgc5-Jan-07 6:47
ednrgc5-Jan-07 6:47 
GeneralRe: ASP.NET cannot read GAC even though has full access Pin
Ed.Poore5-Jan-07 7:29
Ed.Poore5-Jan-07 7:29 
GeneralRe: ASP.NET cannot read GAC even though has full access Pin
Ed.Poore6-Jan-07 8:05
Ed.Poore6-Jan-07 8:05 
GeneralRe: ASP.NET cannot read GAC even though has full access Pin
Ed.Poore6-Jan-07 8:04
Ed.Poore6-Jan-07 8:04 
Questiontable cell backcolor Pin
aransiola5-Jan-07 5:31
aransiola5-Jan-07 5:31 

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.