how to insert a html code in c# windows application project? - c#

I am working on c#,visual studio 2013.
I want to add some html code in my windows application project,so can anybody suggest me how to link or add html code?
Please help me.just got tired of searching.enter link description here

Not sure what the question really is here. If you're asking how to render a HTML page in a C# based application, I am sure you can use WPF to render it somehow, I can't find the component I believed would do this though. You could use something like a WebClient to render the page, but I am not sure this would work very well.
Another similar question was asked Here
Again, sorry but I am not really sure what the question is.

Related

Dummies guide to making dropzone.js work?

I'm trying to implement a drag-n-drop fileupload to my website and found a piece of java called Dropzone.js, it holds everything i need . . . i just have no idea of how to use it!
So far I've been programming only in razor ASP.NET (c#) / HTML / CSS, but so far no javascript / jquery.
It's razor webpages, so no mvc.
Due to my current lack of knowledge in java, i apologize in advance but i'm stuck !!
What i'd like to know is:
I'f i've understood things correct, i should not modify Dropzone.js directly, i should use it as a library and integrate it in my other scripts, e.g. in another .js file. Correct?
Any help in this will be greatly appreciated.
Kind regards,
Daniel A. Rischel
.. Edited as per requested.
Well, you're wrong somewhat. It might not be related to the question but please note these scripts are JavaScript and
java != javascript
Got the point? :) Please try to note this in future. Also, Java code cannot be added to these server-side language, because java itself is a language. You can use JavaScript or its library (jQuery) and create some plugins.
I'f i've understood things correct, i should not modify Dropzone.js directly, i should use it as a library and integrate it in my other scripts, e.g. in another .js file. Correct?
True, you need to link this plugin dropzone.js to the site using
<script href="/link/to/dropzone.js"></script>
Then you'll use this script on the whole of the page where it is linked.
And you should never edit the source code of a plugin, untill or unless you know what you're doing. Because you might mess up with the code.
I'd really like to see some source code examples of what a single file drag-n-drop fileupload form would look like. I've googled extensively but not found something i can use yet.
Did you try to read their documentations? They have a good code explaination on the default (main) page of their website too. And really it depends on just the way you style it. Its just a plugin, you will need to add your own CSS code to style the form. This plugin won't style the form for you, all it will do is to handle the upload events and get back with the result. So, which means that form creation and elements is all upto you!
If there is a dummies tutorial in making this work, i'd really like to be pointed in the right direction!
There is no perfect answer to provide you with, however I will provide you with some basics
http://www.javascriptoo.com/dropzone-js
https://stackoverflow.com/questions/tagged/dropzone.js?sort=newest&pageSize=15 (stackoverflow tag)
In the second link, you can go and see what are the very basic of the issues that are handled with what code. Easy methods will be hanlded by you! You'll need some guidance in just the hard jobs. Good luck for that!
My suggestion for you is to first undertand and learn jQuery, then learn how to make ajax calls. After that you'll know how to create and handle the events. The basic code will be
$('input[type=file]').change(function () { // change in value
// send the file via ajax
}
http://jquery.com
This method will be best as you will know what code you're using and what it will do. Using plugin is easy method then this one. But my preference is with the second one; creating your own plugin.

Can I design a webPAGE with asp.net?

I work with c# for a while now for programming.And I know this may be a stupid question,but is it possible to design a webpage(not a web app)using c# in asp?and if yes,where can I begin from?
Yes
a basic HTML page with .aspx extension is also runnable with IIS
You might also want to look into razor and developing a front end with it.
See webmatrix from Microsoft and don't forget to look into https://developer.mozilla.org/en-US/

Sharepoint basics and any useful resources?

Sorry about having 3 questions in one but they are closely related and should be simple for someone familiar.
I'm used to coding Java/Obj C/PHP and am finding trying to modify a template somewhat annoying partly because it doesn't make sense but mostly I can't find resources.
I am editing a master template and have gotten the basics but some things still allude me.
With the ContentPlaceHolders, is there a way to use it more than once? Someone posted some code about how you can do this but it said I couldn't use code here.
Is there a way to modify these ContentPlaceHolders without using Sharepoint designer?
I thought using the SharePoint: tag would be a possible way around this, but I can't find any docos on the possible tags and what they do and where to use them.
Thanks for any help.
A ContentPlaceHolder in a master page only maps to one Content section in a page/page layout.
Yes, you can modify the contents of ContentPlaceHolder using code, building a control tree.
The SharePoint tag prefix is used to signify a different control namespace, but there is no sharepoint:placeholder
Maybe if you explain what you are trying to do, we might be able to advise you the best way.

Display HTML in a silverlight application

I need to display HTML in my silverlight application and cannot find a way of doing it. I cannot use the web browser control as it needs to be able to run in or out of a browser.
Does anyone know of a good way to do this, because all I can think of doing at the moment is running replace methods on the text to just replace the tags with C# equivalents eg(<br /> to \n).
The way I do it is to check if the application is running inside the browser and change the means of display accordingly. If running inside the browser, I overlay the application with an IFrame, as I describe in this article: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-6.aspx. Otherwise, I use the WebBrowser control. I have a control which does this all for you in the source code that accompanies my book, which is downloadable from the Apress website here: http://www.apress.com/book/downloadfile/4638.
Hope this helps...
Chris
I believe what you are looking for is HTML Bridge.
Edit I'm am actually now unsure if you'll still have access to javascript if you're running this OOB. I'm going to look into this some more and will further update. I'll still leave the answer up though for reference.
Second Edit Here is what I've found. HTML Bridge is disabled when you run silverlight out of browser. This disables access to the HTML DOM as well as Javascript. However, according to a comment on this site:
HTML Bridge is not available when you first install a OOB app. But you CAN force it if you modify the index.html in the folder where the app is installed just adding the enablehtmlaccess parameter.
It works!
You can even create dynamic HTML elements using the well-known methods of the HtmlPage class. You can even open a new browser window with the Navigate() method and its "_blank" parameter.
Keep in mind this information was posted about SL 3. Its possible that this may have changed, but I doubt it. So it seems that what you may want to do is build a script into the startup of your SL app that detects whether or not your app is running out of browser. If it is then you may want to have some script to call that can modify this file for you.
There recently was a similar question.
I posted a link there to an implementation that parses and displays HTML inline in Silverlight. Of course, it will work only with simple HTML, but maybe you can expand it to your needs.

Rich Text Editor on a web page

I am trying to add a rich text editor in my web page where users can write reviews and format what they have written...something similar to the editor in which we write our posts on this site...
can anyone point me to the right direction regarding this...any tutorial that would help me build such a component...
Also i want a free product....(Forgot to mention earlier...)
Something in the likes of TinyMCE or FCKeditor, perhaps.
They're quite complete, and customisable.
The editor used on Stack Overflow is the WMD Editor.
The current version used on the site has been updated by Jeff Attwood and other site users and you can read about it here and get a copy of the code for your own site.
I think you'd be better off using (and perhaps modifying) an existing component rather than writing your own from scratch.
I've been using the Telerik r.a.d Editor, and been very happy with it.
after much research here is what i did...
i needed a control that was free and easy to use..all the editors that i went through came with a licence so i decided to make my own control!!!!
well..i couldnt do that on my own so i used the help of a few sites....
javascript Rich Text Editors
http://aspalliance.com/1092_Rich_Text_Editor_Part_I
http://ws.aspalliance.com/1092_Rich_Text_Editor_Part_II and a few others too...
so the best option for me was to build my own control so that i could customize it according to my needs....
http://freetextbox.com/
here is yet another one: NicEdit

Categories

Resources