Controlling HTML Of A WebPart's Top-right Drop Down Menu?
Sep 29, 2010
I am reviewing some existing ASP.NET code that used ASP.NET WebParts. The web parts implement IWebActionable in order to control the items shown on the web part's top-right drop down menu.
The rendered HTML for each context menu item looks something like this:
<DIV>
<A class="menuItem" onclick="stuff" href="javascript:void(0)">
<IMG src="something.gif"/>Menu text
</A>
</DIV>
I want to use the CSS Sprites technique on the images used for the menu items. However, in order to do this I need to have some control over the rendered HTML, changing it to something more like this:
<DIV>
<A class="menuItem thisItemCssSpriteClass" onclick="stuff" href="javascript:void(0)">
Menu text
</A>
</DIV>
I cannot get the Drag and Drop functionality of Web Parts is to work. I have a very simple test page with two WebPartZones.. In the OnInit method of the code behind I put the page in design mode. In the first zone I have a textbox.At runtime the text box renders as a web part. When I hover over the web part header my mouse pointer changes the 'move' pointer, but I cannot drag the item. I do not see it dragging and the part never moved. I am using Visual Studio 2010 with IE 8. I have tried IE8 in compatibility mode and regular mode. The results are the same. Here is the markup from my test page:
I cannot get the Drag and Drop functionality of Web Parts is to work. I have a very simple test page with two WebPartZones. . In the OnInit method of the code behind I put the page in design mode. In the first zone I have a textbox.At runtime the text box renders as a web part. When I hover over the web part header my mouse pointer changes the 'move' pointer, but I cannot drag the item. I do not see it dragging and the part never moved. am using Visual Studio 2010 with IE 8. I have tried IE8 in compatibility mode and regular mode. The results are the same.Here is the markup from my test page:
I pick up on the nerddinners examples, following Professional.ASP.NET.MVC wrox book. but now i'm doing some modifications for my own account. On traditionl ASP.net it was possible to interact with html elements (divs, textbox, etc... )On MVC 2 is that possible or any interaction with html must be done with jquery and how? Because i'm trying to manipulate an html element on my Controller page(DinnerController.ASPX and i had no reference to html div, as i initially supose.
I have a well established site in asp.net. I need to use the silverlight player to provide video streaming of meetings we have pre-recorded. I want to be able to provide a list of agenda items in a list / menu style setup in the asp.net page, then based on which link the click change which video the silverlight player plays.
I also need to capture some information from the asp.net page, and don't have time to build a full silverlight application to manage. What is the best way to do this?
I know to put the object tag, and set the source to the xaml file / xap file, but how can I change the video source inside the xaml file? Or is it going to be easier to build out the "full page in silverlight" and then just wrap it in the asp.net page?
does anyone know how to access a webpart using the HTML Document Object Model? for example: for a given page which contains a webpart manager and a webpartzone.
[Code]....
I cant access the custom control using the HTML DOM Like this: HtmlDocument doc = HtmlPage.Document; HtmlElement element = doc.GetElementById("HostTest"); HtmlElement element1 = doc.GetElementById("silverlightControlHost"); HtmlElement element2 = doc.GetElementById("WebPartZone3"); HtmlElement element2Parent = element2.Parent; HtmlElement element3 = doc.GetElementById("SLRoomConsumerPart1"); //element3 does not return anything at all just Null!
all of the other elements are returned except for element 3 which returns a null! Any controls (regardless if it is a custom control, ASP control, Usercontrol . i tried it by replaceing the custome control with an aspnet button. i go t a null value as well) placed in the <ZoneTemplate> Tag of the <WebpartZone> is not returned using the HTML DOM. I find this stupid and pointless, as the whole point of a webPart is that you can place all sorts of controls in it : customcontrols, usercontrols html controls, html server controls, aspnet controls and you cant seem to get access to those controls using the HTML DOM model in codeBehind <asp:WebPartZone ID="WebPartZone3" runat="server" Height="90%" Width=" <ZoneTemplate> <cc1:SLRoomConsumerPart ID="SLRoomConsumerPart1" runat="server" /> </ZoneTemplate> </asp:WebPartZone> HtmlDocument doc = HtmlPage.Document; HtmlElement my_WeBpart_Element = doc.GetElementbyId("myCustomWebPartControl1") can anyone point me to a solution or a work around as i am trying to access the dom from silverlight 3 but should be exactly the same as doing it from the webpart'shosting page's code behind. so that i can reference the controls inside my web part from the code behind of the custom page once i get hold of the webPart Element referece.
I am new in sharepoint development. I have 2 webparts attached on a page. The first webpart (MyTestingWebpart1) basically it does only inserting of data and the other webpart (MyTestingWebpart[2]) displays the records from the database. Now my problem is when I try to click on the save button, somehow I don't know how to refresh the webpart that displays the newly inserted record. Is this possible?
I have added a query at the page load event of MyTestingWebPart[2]. Both of the webparts attached are web user controls.
I have created one sample application for WebParts. It is working fine when I run it from Visual Studio or local environment.
But when, I have publish file in IIS virtual directory (in my PC or same PC) at that time it is stop showing Verb tool bar (minimize, close buttons of WebPart).
using Visual Studio 2008. This is for a website which produces .aspx webpages. I am creating a .master page template. I would like to create a horizontal drop down navigation menu using custom buttons. I have button jpg which i really like. I of course want the button to have the title ON the button. When i click on the button it should display its submenu below. This menu would use a sitemenu data source from the actual website. I dont see a way to use your own nav buttons in the Visual Studio toolbox. (sure you can edit the padding, color etc. but that's not what i want) Any suggestions or referrals to any generators that will work with an aspx page?
According to the book im reading i should have more menus such as the "Block Formatt, Font Name, Font Size" in my Style Application toolbar, but i dont have anywhere near as many as the book suggests, Just a drop down menu that has "manual" and "automatic"
I want to create a drop down menu in ASP.NET such as this website [URL] when I click on the button or the object I get other links to other pages that I specify by myself. Can anyone show us steps or guide me?
I'm using the asp.net menu control. It's working great, but I'm trying to figure out how to make the area around the text in the menu clickable? You see, some words in the menu are much longer than others, and I don't like it that the user has to move their mouse to the left to be able to click on the word in the menu just because it is shorter. Is there a way to make the entire menu item clickable? My menus are across the top of the page Left to Right, and then they drop down. And it's in that dropdown menu that the text length varies.
I have created a horizontal menu using <UL> and <li> tags. Hovering over a top level <ul> causes the lower lever <li>'s to drop down. This works well but there are two narrow <div>'s below that act as decoration. These disappear when the drop down submenus lay over them. I have played with the z-index properties of both lower <div> and of the menu items but have not resolved the issue. I want the submenus to drop down over the <div> but for the <div> to remain visible outside of the covering sub-menu.
this sound may too easy, but for a person who has no idea about the asp.net is not. I am using visual studio 2008 and I want to add a drop down menu in my page. does any body have any idea how to add this please? The dropdown menu should be linked to a table from an access database since I am going to collect the data with C# therefore I decided to post in in this forum.
I am attempting to add a drop down menu to a gridview once the user slects the "Edit" button for the gridview. I want the value, before the edit button is selected, to be the value in one table and once the "Edit" button is selected I want to show values from another table in a drop down menu so the user only has specific values to edit the selected row with.
2 tables:
table 1) tbl_FormalizeRawData - List of columns from a table inside a database table 2) tbl_StandardColumns - list of standard column names for system tables.
I want the user to be able to specify which raw non standard columns corospond to the standardized system table columns.
example:
RawClientTable.MiscColumn1 = SystemTable.Member_First_Name RawClientTable.MiscColumn2 = SystemTable.Member_Last_Name my code for the gridview is as follows. I am looking to see what else I need to do in order to allow the gridview to be edited on the final column by a dropdown menu populated by a seperate table but display the item in the main table with all the non standard column names:
[Code]....
a boot in the rright direction. I attempted to go through the "Walkthrough: Displaying a Drop-Down List While Editing in the GridView Web Server Control" at the website[URL] as it was geared toward a drop down menu added to a gridview both using the same table.
I have written a code that populates data from database into the tree using C# and is working perfectly , the thing is how can i populate the tree based on a selection from a drop down menu
Issue is Menu is not overlaping or float, above the IFrame i am design the menu with table and Div tag in Usercontrol From and i called Usercontrol from in the Index.aspx.
In my controller I generated a SelectList that I pass to the dropdown helper:<%= Html.DropDownList("abc123", Model.SomeList) %>I look at the querystring for a value, which is a ID.I then loop through all the items in the SelectList and if it is equal to the ID, I do:The controller action then passes this SelectList to the view and then to the Html helper.In debug mode I can see the value does get set to true, but the html renders without selecting the item.
I tried putting a html replace code into a string which is then placed into a drop down menu. Only problem is it still appears as ² instead of a small 2.
I wish to use drop down menu(based on a table of my database) to update/insert data in a web form. The data is then fetch in to SQL table (Express).ow to do it ?