I am trying to display a div element in winform solution, searching for good control from the basic/devexpress controls to display div elements but I can't find any.
is there any idea how I can display the dev elements without using web browser control
Related
I'm writing a WPF app to load XML into the WebBrowser control (via the Navigate method) and also populate a Treeview with the XML nodes. I have managed to do both of these without issue but what I need to do now is find and scroll to the node in the WebBrowser when I double click a particular node or element in the TreeView.
I suspect I can use XPath with a Javascript or DOM query but apart from that idea I have no idea to do what I need or if, once the node is found in the XML whether I can get the webbrowser control to scroll to it. I've googled this for ages but can't see anything so far that shows me how to do this - can anyone point me in the right direction please?
I am coding a C# forms application where I am creating some html and this is being displayed in a WebBrowser control.
My question is this: Is it possible to render some of the html tags in a different object. By this I mean, I would like to extract some html and display this html somewhere other than the main WebBrowser control.
For example:
I am displaying a jQuery slider, and I am also displaying the value of the slider in a div. If possible, I would like the jQuery slider to be displayed in the WebBrowser control, but the value of the jQuery slider to be displayed in another control.
Can this be done, and if so, what concept do I need to implement?
Thanks.
I have used calendar control of ASP.NET. When I move on any date than it will be display tooltip , in which I can show my another aspx page. And in that aspx page there is gridview.
How can I display tooltip which contains aspx page.
Try this
Track one
Use a div to position your element as a tooltip.
In that div use an iframe in which you can load your aspx page.
Track two
you can use div without iframe and use jquery to pull data from server against hovered date and render that data into that div at runtime using $("#divID").html() function.
Personally I would recommend track two because here page life cycle is eliminated and data would load much faster which is required for a tooltip,
only demerit with track two is that its a little complicated because you will have to create your design at runtime using document.createElement() and other functions like that.
You could get some help from Here maybe.
I am working on .net 4.0 application. I am trying to load a bunch of custom controls that has a "gridview" control along with several text boxes and dropdowns. As the viewstate is really slowing down the system in order to improve the performance I Disabled the ViewStateMode of the parent control (i.e User control) and Enabled the ViewStateMode for dropdowns. But the problem I have is the dropdowns inside the gridview and panel thrw an error even though their ViewStateMode is Enabled. If I Enable the ViewStateMode of gridView or Panel it works fine but that's increasing the size of Viewstate.
Can somebody please make me understand why it is happening and what is the solution for this?
Thanks
BB
If you are getting tons of viewstate.Then I would suggest you two ways that worked for me too
Compress Viewstate - http://www.codeproject.com/KB/viewstate/ViewStateCompression.aspx, http://www.hanselman.com/blog/ZippingCompressingViewStateInASPNET.aspx
Trace the layout of the rendering area in html, using div , ul, li wahtever. Now instead of placing grids and other server controls, get the datasource(datatable or dataset), itereate through the items and make the html in the codebehind and write the final html tag on page using a literal. using html controls you can get rid of the view state issues. Also on that html tag you can apply jquery to make it better too.
I'm using WebBrowser control to load my page. I want to hide all the html elements in the page apart from a particular div (and its children). I've the id of that particular div. How can I hide all the other elements?
Edit
I'm creating the webbrowser instance dynamically. I want to navigate to a URL and take a screen shot of the page partially (a particular div). So I want to hide all the other elements in the page and take a screenshot.
I used JQuery to hide all the elements apart from my div and its children. I referred this post for the script and called the script in the webbrowser using InvokeScript(). It worked perfectly.