inserting links to ajax control toolkit html editor - c#

I used following code to simply add the insert link button.
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.InsertLink());
But I am facing issues in IE and Firefox as the insert link box is not appearing at proper place or sometimes it is hiding behind other controls and hence not accessible.
Has any one else faced similar problems?
Is there any other way to add/identify url(s) to the html editor?
Any help will be appreciated!
Thanks!

Related

Winforms control for displaying html text

I am coding a Windows Forms Application in C#, and one of the requirements is to display some html code in a control, with the correct colors that correspond to the relevant tags.
E.g. When right clicking on a webpage in Google Chrome, then selecting View Page Source, a form is shown with all the html, correctly formatted, with tag colors and each line of code's line number.
Is there a free, reliable control that can do this? Is there an inbuilt Microsoft control that does this?
As I am new to this area of coding, can someone please provide me with some useful names, and some resource links if possible? I am not sure of the correct name for a control that does this, and as such, my Google searches have not come up with what I am looking for.
Also, the control needs to be trustworthy.
Thanks
You can try ScintillaNET control. It's open source and has HTML syntax highlighting as well as many other features.

Telerik chart not loading correctly (ajax/script issue?)

I have a page which contains user controls with Telerik Charts (grids also, but they work fine). From this page, the user can click on a button to be redirected to a "Printer-Friendly Version" type page, which opens a new window via javascript and goes through a slightly different view (for formatting and stuff), but the telerik code is all the same.
The problem is, my Chart displays just fine in the original window, but the new window displays basically an empty chart with no data. This bug is only present in IE, and only applies to Charts. Grids work fine, for whatever reason. I'm thinking this is due to differences in script caching between browsers -- correct me if I'm wrong, I'm semi-new to client-directed web development.
Anyway I read somewhere that Telerik has issues with loading data and/or js files when loaded via ajax, so maybe that's the problem? If so, how could I get around this? And if not, any ideas on what could be causing this issue? It's causing me a great deal of frustration, since a print preview page seems like it should be the easiest of jobs.
Edit:
The charts are being rendered as html (if somebody can explain how to render them as images, that would be awesome). And dev tools shows basically the same thing between chrome and IE. Whenever my web service goes back up ill WinMerge them and look for any peculiarities/differences between them. In the mean time, though, the "render as an image" concept sounds promising. That way I could just save the image from the first page, and insert it right into the print preview page, right?. And since it's a print-preview page, it's not going to need to be interactive or anything, so that'd work out nicely.
Another (important) Edit:
These are probably the culprit...
And here is a little more detail on that:
And here is a side-by-side of it working(in chrome) and not working (in IE):
Have you considered using a print-specific stylesheet instead, e.g.
<link rel="stylesheet" type="text/css" media="print" href="print.css" />
In which you specify the styling to apply when printing.
That way, you avoid reloading the page (duplicate database hits, etc.) and don't need to delve into the AJAX of Telerik's controls.
EDIT:
Regarding using an image rather than HTML, first make sure you won't lose any features/detail, then check out the .Save() method of the RadChart control. You could either save it to a memory stream, or if you want to re-use the image save it to a directory on the webserver and clean it up periodically. That way, you can just point your print version to the image and not re-generate it.
This Telerik forum post may be of use.

search text on web page

I am attempting to create a 'find on page' search option for a wp7 webbrowser control named 'TheBrowser' (using the standard webbrowser control in Visual Studio). I have done a lot of research but have not found much in the way of an example or sample where this was implemented. Essentially I will just be activating the search on a click event, from a textbox where the user may type in a word to search in the current webpage. I would also like to highlight the matched words as seen when doing a find on page search on a desktop browser.
I believe that to create this 'find on page' option I should use javascript to search through the lines of text, and then somehow highlight matched words. I have already implemented forward, back, and refresh buttons using TheBrowser.InvokeScript, but I do not know how to format for searching through the entire webpage (I have never done anything like this before). Any advice or assistance would be greatly appreciated, including code samples as I am completely new to this subject! Thanks in advance for your help and hard work!
Try jquery, this should do the trick: http://hugoware.net/blog/more-jquery-magic-search-highlighting You'll just need to inject the jquery script into the page.

Asp.net IE & Safari JQuery compatiblity issue

I recently developed a site but I am having some troubles with displaying a particular JQuery Carousel on Safari be it on the PC or iPhone. Displaying on IE or Firefox has no problem. The issue arise when I refresh that particular page, the JQuery becomes distorted, the image is sliced and buttons gone. I would really like to show some code but I am not sure where to pinpoint the problem.
This is the page:
http://clotheher.com.microsoft2008hosting.com/ProductDetails.aspx?ProductId=2&&CategoryId=1
On the bottom right side is the carousel. Anyone experiences such problem or understand this behavior please kindly let me know. Thanks.
This doesn't appear to be jQuery, but rather CSS.
div.caroufredsel_wrapper and ul#foo2 both have specified heights which are causing the images/buttons to cutoff.

How to add/edit functionality in the same page without flickering?

My current asp.net(c#) project required add/edit functionality in the same page without flickering.
To fill the textbox,fileuploader & dropdown list etc while updating the contents.
I searched google,but fileuploader not working properly in the ajax update panel
Please give examples/reference for solving the problem.
The following links will help you.
http://www.ajaxlines.com/ajax/stuff/article/using_jquery_to_directly_call_aspnet_ajax_page_methods.php
http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

Categories