|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
asp:Menu, DynamicItemTemplate and formating textpostback . I am using the DynamicItemTemplate. The simple form for the template is <DynamicItemTemplate> <b><%# Eval("Text") %></b> <br /> <%#Eval("ToolTip")%> </DynamicItemTemplate> and it look like this for example Text dkd kdk ToolTip alkd alkdj fl adjla l dfjaldkfja la dfaldfka laskdflas dflajdf a aldkjfal ajdf This works great but I want to format the text in the ToolTip so I can set the width and allow it to wrap. So it would look like this Text dkd kdk ToolTip alkd alkdj fl adjla l dfjaldkfja la dfaldfka laskdflas dflajdf a aldkjfal ajdf Code in the dynamicItemTemplate like this formats ok but when I click in the tooltip text the menu does not work. when I click in the text section it works OK. <DynamicItemTemplate> <b><%# Eval("Text") %></b> <br /> <table Width=250><tr><td width=250> <%#Eval("ToolTip")%> </td></tr></table> </DynamicItemTemplate> Thank you -- Jerry Hi Jerry,
Regarding on the ASP.NET Menu control's dynamiItemTemplate postback issue, it is due to the html <table/> element will suppress the click event at client-side, somewhat related to the client-side webbrowser's implementation when there is html <table> nested inside html <a> link element. So far I have tested a means to overcome this behavior. You can add a javascript statement in your html table element's "onclick" client-side handler which programamtically trigger the parent element(the postback link generated by ASP.NET menu control). Here is the code snippet: ===================== <asp:Menu ID="Menu1" .............> <DynamicItemTemplate > <b><%# Eval("Text") %></b> <table Width="250" onclick="this.parentNode.click();"> <tr><td width="250"> <%#Eval("ToolTip")%> </td></tr></table> </DynamicItemTemplate> ======================= You can have a test on your side to see whether it works. Hope this helps. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Steven,
Thank you that works great. -- Show quoteHide quoteJerry "Steven Cheng[MSFT]" wrote: > Hi Jerry, > > Regarding on the ASP.NET Menu control's dynamiItemTemplate postback issue, > it is due to the html <table/> element will suppress the click event at > client-side, somewhat related to the client-side webbrowser's > implementation when there is html <table> nested inside html <a> link > element. > > So far I have tested a means to overcome this behavior. You can add a > javascript statement in your html table element's "onclick" client-side > handler which programamtically trigger the parent element(the postback link > generated by ASP.NET menu control). Here is the code snippet: > > ===================== > <asp:Menu ID="Menu1" .............> > > <DynamicItemTemplate > > <b><%# Eval("Text") %></b> > > <table Width="250" onclick="this.parentNode.click();"> > <tr><td width="250"> <%#Eval("ToolTip")%> </td></tr></table> > </DynamicItemTemplate> > ======================= > > You can have a test on your side to see whether it works. > > Hope this helps. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > > ================================================== > > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif > ications. > > > > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 1 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions or complex > project analysis and dump analysis issues. Issues of this nature are best > handled working with a dedicated Microsoft Support Engineer by contacting > Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/subscriptions/support/default.aspx. > > ================================================== > > > > This posting is provided "AS IS" with no warranties, and confers no rights. > >
How to bind a textbox to an a data source
How to "program" a button's click ? asp:menu control and underline on menuitem text asp.net ajac and cacheRolesInCookie Links to functions in the CS file inside a GridView what javascript library? How to read a value in a Formview ? using cdosys.asp for form mail DetailsView Update command working, but it wipes out my record with null values Resizing Component Controls on CompositeControl |
|||||||||||||||||||||||