Hide Non-Displayed ASP Elements in Design View - asp.net

Is there a way to prevent non-displayed elements from appearing in the ASPX Design View editor?
By "non-displayed elements", I mean the background elements (Managers, DataSources, Validators, etc) that show up as grey boxes containing the type and id.
If I have several of those at the top of the page, I can't see much of the preview of my page.

Nevermind, I found it!
Click inside the editor (the Design pane).
View (menu) -> Visual Aids (submenu) -> ASP.NET Non-visual Controls

Related

visual studio 2012 show hidden tags in design mode

In visual studio if you have an hidden field,
eg:
<div style="display:none">
This content is not visible in design time
</div>
In design mode one cannot see the content of the div.
Are there any settings in Visual Studio 2012 to make invisible tags to be seen in design mode?
On the Visual Studio menu go to View -> Visual Aids.
You should see CSS Display:none Elements and/or CSS Visibility:hidden Elements.
To help you edit a page, Design view displays certain elements, such
as hidden fields, that would normally not be visible in the browser.
Design view also displays gray boxes or other representations of
ASP.NET server controls, such as data source controls, that do not
render markup at run time.
To toggle markers on and off for non-graphic HTML elements in Design view
On the View menu, click Details.
To set markers to display whenever you open a Web page in Design view, do the following:
On the Tools menu, click Options.
Under HTML Designer, select the Display check box.
Under Display Options, select the Show details for
non-visible elements check box.
To display or conceal table borders in Design view
On the View menu, click Visible Borders.
This displays edges around tables and frames that would otherwise not appear.
To set borders to display whenever you open a Web page in Design view, do the following:
On the Tools menu, click Options.
Under HTML Designer, select the Display check box.
Under Display Options, select the Show details for non-visible elements check box.
To mark ASP.NET server controls
On the Tools menu, click Options.
Under HTML Designer, select the Display check box.
Under Display Options, select the Show glyphs for server controls check box.
Source

Designing Custom Drop Down with mulitple rows and columns

I have a requirement like for the drop down as shown. Could any one help me in achieving this.
Briefing:
On click of the button a pane should be opened which contains rows and columns containing text, on click of it appropriate action need to take place. The source can be dynamic too....
There are many techniques for acheiving this design. You could do it purely with html and css by having an image that looks like a dropdown popup an absolutely positioned div underneath. Or you could use the asp.net ajax control toolkit control called "PopupControl" that essentially abstracts all the html/css away allowing you to just specify a target panel. There are also various jquery plugins, here is one from abeatifulsite.

Looking for a vb.net code to add existing buttons/text boxes/drop down lists, etc. to a container, or holder?

I'm using vb.net. Basically, I have a drop down list, text box and a submit button. You choose a movie director from a drop down list, then type in a movie, click button and it adds the data to my database.
There's another button which hides/shows drop down list, text box and submit button using Visible = True and Visible = False, but what I don't like about it is when it hides the things I said before, it leaves some white/empty space like if they are still there, but not visible.
Is there anyway to put some kind of holder/container and place a button which when clicked could add my drop down list, text box and submit buttons to that place?
Cheers,
E.N.
I assume that you are working with WinForms in Visual Studio. In the Toolbox the controls which could help you out of this situation are in the "Containers" section. Among others, there is a Panel, a FlowLayoutPanel and a TableLayoutPanel (see this video on msdn for a TableLayoutPanel Demo). They can help you to organize controls. Especially the FlowLayoutPanel places the controls automatically. But you can always change the Top and the Left properties of any control, to move them around to the desired place or group some of them on a Panel and change the Location of this one one.
You can add a control to a container by using the Add method of its Controls property. However, if the control is already on the form (since you are asking how to add an existing control) you must remove it from the form before.
Me.Controls.Remove(myButton)
panel1.Controls.Add(myButton)

ASP.NET TreeView nodes not expanding and collapsing

I have a TreeView menu populated from a SiteMapDataSource. The TreeView defaults to all nodes expanded, but the normal client side expand/collapse behaviour for the nodes is not working. I get one Javascript error in my Firebug console, being:
TreeView_ToggleNode is not defined
What could be causing this?
The TreeView menu is on a page that displayed content pages in an IFrame. The TreeView is bound to a SiteMapDataSource, and for convenience, the developer added a <base> tag to the page, declaring the target of all links on the page to be the IFrame. The TreeView uses javascript links for it's navigation buttons and setting a base target breaks these all.
I solved the problem by selectively setting only the actualy menu links, not the expand and collapse buttons, to have a target of the IFrame, with the following jQuery:
$("#navigation a[class^=menu]").attr("target", "iframe1");

ASP Menu bar, Static view

I am looking to create a menu bar with a specic type of "action"
Similar to the bar on this website
BBC Sport
Its totally static and has no dynamic or "pop out" sections. When the top menu is clicked the page will re-load and display the lower level in a diffrent colour.
Can this be achived with the Standard ASP:Menu control?
I am not a big fan of the pop out feature however I do not want all my options to be visible to my users at root
Hope that makes sense
Check out this basic ASP.Net Menu control page. You can click on the "Run" buttons to see very basic versions of the menus.
The advantage of using this particular approach is that you can tie it to a sitemap, so you don't have to keep updating the menu code. You just add the page(s) to the sitemap, and the menu picks it up.
You can also dynamically link the menu to different sitemaps, such as one for the admin menu and another for regular users' menu.
The Menu control is in the navigation section of the toolbox.
To experiment with the built-in functionality (before writing your own code to do what it will do for you), just drag and drop a menu control onto your form. Then, use the common tasks menu to:
autoformat -- good for quick & dirty because it sets hoverstyle too
set the data source
set the view type (static or dynamic)
define menu items with an editor
work with templates to set appearance
You have to go to properties to set menu appearance.

Resources