Search Results

Search found 33433 results on 1338 pages for 'html editor'.

Page 6/1338 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Html.LabelFor and Html.TextBoxFor generate empy html code

    - by Ceridan
    I'm writing my first ASP.NET MVC application and there is one big problem for me. I want to make a control which will represent a form, but when I try to generate labels and textboxes it returns to me empty page. So, this is my model file (MyModel.cs): namespace MyNamespace.Models { public class MyModel { [Required(ErrorMessage = "You have to fill this field")] [DisplayName("Input name")] public string Name{ get; set; } } } This is MyFormControlView.ascx file with my control: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyNamespace.Models.MyModel>"%> <div> <% using (Html.BeginForm()) { Html.LabelFor(m => m.Name); Html.TextBoxFor(m => m.Name); Html.ValidationMessageFor(m => m.Name); } %> </div> And this is my Index.aspx file where I render the control: <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Main.Master" Inherits="System.Web.Mvc.ViewPage<System.Collections.IEnumerable>" %> <asp:Content runat="server" ID="MainContent" ContentPlaceHolderID="MainContent"> This is my control test! <%Html.RenderPartial("MyFormControlView", new MyNamespace.Models.MyModel { Name = "MyTestName"}); %> </asp:Content> So, when I run my application the result is lonely caption: "This is my control test!" and there are no label or textbox on the generated page. If I inspect the source code of the generated page I can see my block, but it's inner text is empty. Please, could you help me?

    Read the article

  • Using embedded standard HTML forms with ASP.NET

    - by RM
    I have a standard aspx page with which I need to add another standard HTML form into and have it submit to another location (external site), however whenever I press the submit button the page seems to do a post back rather than using the sub-forms action url. A mock up of what the form relationships is below. Note in the real deployment the form will be part of a content area of a master page layout, so the form needs to submit independantly from the master page form. <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <form id="subscribe_form" method="post" action="https://someothersite.com" name="em_subscribe_form" > <input type="text" id="field1" name="field1" /> <input id="submitsubform" type="submit" value="Submit" /> </form> </div> </form> </body> </html>

    Read the article

  • How do I extract HTML content using Regex in PHP

    - by gAMBOOKa
    I know, i know... regex is not the best way to extract HTML text. But I need to extract article text from a lot of pages, I can store regexes in the database for each website. I'm not sure how XML parsers would work with multiple websites. You'd need a separate function for each website. In any case, I don't know much about regexes, so bear with me. I've got an HTML page in a format similar to this <html> <head>...</head> <body> <div class=nav>...</div><p id="someshit" /> <div class=body>....</div> <div class=footer>...</div> </body> I need to extract the contents of the body class container. I tried this. $pattern = "/<div class=\"body\">\(.*?\)<\/div>/sui" $text = $htmlPageAsIs; if (preg_match($pattern, $text, $matches)) echo "MATCHED!"; else echo "Sorry gambooka, but your text is in another castle."; What am I doing wrong? My text ends up in another castle.

    Read the article

  • Jquery .html() function returns html out of nested order

    - by forcripesake
    I have a method which returns a persisted html template from a database. The template is of the format: <div id="item_collection"> <div id="item_x"> <p id="item_x_headline"><h2>Some Headline</h2></p> <p id="item_x_excerpt>Some text here</p> </div> <div id="item_x+1"> <p id="item_x+1_headline"><h1>Some Headline</h1></p> <p id="item_x+1_excerpt>Some text here</p> </div> ...and so on. </div> However after I run the following: alert(data); //check that the template is in order. It Is. $('#template_area').html(data); the Html is now: <div id="item_collection"> <div id="item_x"> <p id="item_x_headline"></p> <!--Note The Lack of Nesting --> <h2>Some Headline</h2> <p id="item_x_excerpt>Some text here</p> </div> <div id="item_x+1"> <p id="item_x+1_headline"></p> <!--Note The Lack of Nesting --> <h1>Some Headline</h1> <p id="item_x+1_excerpt>Some text here</p> </div> ...and so on. </div> So what gives? Is there a better way to replace the empty template_area's content than the .html() method?

    Read the article

  • Copying content on webpages in safari. To HTML

    - by Carl Smith
    Hi, is there an easier way to copy and paste website content in html? Want to copy and look like this. Product Information: Length: S / M / L Material: Polyester and Elasthane Brand: Roxana Exclusive Style: Basque But when i paste it into my content box it looks like this- Product Information Length: S / M / L Material: Polyester and Elasthane Brand: Roxana Exclusive Style: Basque Then i need to edit it in the html editor to rearrange it. Is the some sort of app or plugin that i can get so i can turn the text of the page into html so it looks right straight away when i copy it into my content box? If that makes any sense? Thanks Carl Smith :-)

    Read the article

  • Benefit of using Data URI to embed images within HTML document and its cross-browser compatibility

    - by Manoj Agarwal
    I want to embed an image using Data URI within HTML document so that we don't need image as a separate attachment, we get just one HTML file that contains the actual image. What are its advantages and disadvantages? Does IE10 supports it? Is it useful to have such an implementation? I am working on an application, where we have html documents that link towards images stored in some location. If I use tiny online editor, as images are saved somewhere in the server, while editing the document, i can provide a link towards that image, but can't preview the final document with images from within tiny editor. If I chose to download the file locally, then i will need to download the images from server side. It looks a bit overkill, so I thought if Data URI could be used in such a situation.

    Read the article

  • Why no client-side HTML include tag?

    - by Xepoch
    I had a question posed to me the other day by another programmer. I remember (a very long time ago) wondering the very same. Why was a browser-side include tag never considered? Or was it? Specifically with a tag that instructed the browser to include additional HTML from other sources. e.g. <include src="http://server/foo/bar.html">. Many folks will make javascript calls and fill innerHTML to accomplish the same, when the same outside a the javascript engine could be accomplished by the browser. It would have been painful to have nested <HTML>s <BODY>s (i.e.) but we have to consider that aspect anywhere anyway.

    Read the article

  • Joomla 1.5.26 won't let me insert html

    - by Arthur
    I am using the following code to try to embed chat in to an article in Joomla 1.5.26: <iframe src="http://xxxxxxx.com/welcome/visichat/" width="100%" height="550px" frameborder="0" scrolling="no"></iframe> Whenever I hit save, the code disappears. Actually, it seems that any html code I try to save disappears. I am trying with the toggle editor tab and the insert html button. Does anyone know why Joomla won't let me embed html? I am trying to get the chat to load with the site navigation still in place. I'd also be interested in hearing other ways to accomplish this.

    Read the article

  • Script to embed image and CSS data in HTML files

    - by andreas-h
    I have a HTML page which references external stylesheets and shows some images. I'm looking for an easy way to include all referenced external resources in the HTML file directly, so that it doesn't have any external references any more. (Images should be included in the HTML file using the <img src="data:image/jpg;base64,[...] method). EDIT: I want to do this so that my web proxy can deliver a nice-looking error page if the backend is down, so I have to assume all my webservers cannot deliver the static content which would normally be linked to from my websites (CSS, images).

    Read the article

  • I upgraded from win 7 to ubuntu 12.04 and know my html codes dont work

    - by user171010
    Hello i just started using Ubuntu the other day i never used Linux or anything else besides windows before. I started learning HTML on windows 7 before switching to Ubuntu and know my HTML images are not working even after i made new images on Ubuntu and put the correct path and made sure the images are .png. After all that the site does not load the new images and the coeds are just fine i put my HTML files on cloud storage before switching to Ubuntu so its not the codes. Also i am using Mozilla Fire Fox.

    Read the article

  • Beginning HTML and CSS [closed]

    - by romani
    My goal of learning HTML and CSS is to be able to modify popular scripts such as Wordpress, vBulletin, Drupal, etc. I haven't started yet learning CSS and HTML or XHTML. I see many, many books and tutorials out there so it is difficult to make a choice. I think most of web designers were like me in the past and have read many books. So, could you tell me about 1 good book for HTML and 1 good book for CSS? and if I should read the book from cover to cover or only learning the basics is enough for modifying Wordpress, for example!

    Read the article

  • Nicest way to map rgb colors from html to led

    - by back_ache
    I have attached an rgb led to a color picker on a webpage and have hit the obvious problem that though the led is 8-bit like html the color rendition is very different so with the more subtle shades the led values for the color are wildly different to the html values. The brute-force method would be for me to have a lookup-table on the webserver to map the two sets of values but would ideally like to do it more elegantly Before I start listing all my 101 ideas for doing this I wondered if anyone else had come across the issue, the end-game would be to be able to abstract the color-rendition of different leds and make it available as a webservice (html value and device id in, led value out)

    Read the article

  • Best practice for managing dynamic HTML modules?

    - by jt0dd
    I've been building web apps that add and remove lots of dynamic content and even structure within the page, and I'm not impressed by the method I'm using to do it. When I want to add a section or module into a position in the interface, I'm storing the html in the code, and I don't like that: if (rank == "moderator") { $("#header").append('<div class="mod_controls">' + // content, using + to implement line breaks '</div>'); } This seems like such a bad programming practice.. There must be a better way. I thought of building a function to convert a JSON structure to html, but it seems like overkill. For the functionality of the apps I'm using: Node.js JS JQuery AJAX Is there some common way to store HTML modules externally for AJAX importation?

    Read the article

  • HTML to XAML Conversion, Display HTML in RichTextBox

    - by Erika
    Hi, unfortunately im REALLY stuck on this and was wondering in anyone knows how to work around this. I have some html text which i want displayed in a WPF RichTextBox. At the moment, i'm using some helper APIs found http://blogs.msdn.com/wpfsdk/archive/2006/05/25/606317.aspx to convert HTML to XAML. So at the moment i have a xaml data string, but i cant see to find a way to display this correctly within the richtextbox :s i have been trying the following: string xamlData = HTMLConverter.HtmlToXamlConverter.ConvertHtmlToXaml(sBody,true); FlowDocument result = XamlReader.Load(new System.Xml.XmlTextReader(new StringReader(xamlData))) as FlowDocument; but this is crashing on the XamlReader.. Any other way will do, i just need to display an HTML string in this RichTextBox or something else! Please Help!

    Read the article

  • Is there any "modern" text editor with command-line/minibuffer?

    - by Pedro Morte Rolo
    A command line in a text editor is a wonderful feature. It allows the user to explore the editor's functionality and learn it's shortcuts in a textual way. It's much faster than using the mouse, and it is much easier to memorise "shortcuts" this way. Emacs and VI provide this, though, emacs and vi are not "modern". By "modern", I mean one that is original built to cope with the modern de-facto standards of selecting, copying, pasting, cutting, undoing, redoing and auto-completing. Cream/vi or Emacs/CUA are not valid options, since there are loads of things built over them that conflict with the mentioned stuff. It would be nice if there was an editor that would cope with the modern de-facto standards out-off-the-box, but still provide a command-line/minibuffer to perform/explore the commands and learn its shortcuts. Is there such a thing? I do not intend to use the "modern" term as derrogatory. I love both Emacs and VI, but I hate their keyboard-shortcut historical baggage. When I reffer to de-facto standards, I am not talking about Windows vs Whatever. Kate, gedit, Eclipse, Intelij or Textmate also follow the norm I am talking about and are not Windows editors. Please do not advertise Vim and Emacs, that's not answering the question. I am asking for alternatives. Why don't I like emacs and vi: Emacs: Despite CUA mode, emacs has loads of modes that conflict with this (e.g. slime, ruby-mode, etc...) It would be nice to have something that would work out-off-the-box. VI: I do not like that it is Visual/Insert-based. I do not know how to browse the text-editor's commands. I do not like that it is so much tought for the terminal. I believe that it has the same problem that I mentioned for emacs. This question is starting to look like requirement analysis.. As de-facto standards I mean: Ctrol-XCV for cut-copy-paste Ctrol-A for select-all Contrl-Z for Undo Ctrol-Y for Redo Control-F for Searching Contrl-Space for auto-complete Shift-arrow for selection Control-arrow for word-navigation Alt-Arrow for moving

    Read the article

  • Html helper to show display name attribute without label

    - by Pedre
    I have this: [Display(Name = "Empresa")] public string Company{ get; set; } In my aspx I have: <th><%: Html.LabelFor(model => model.Company)%></th> And this generates: <th><label for="Company">Empresa</label></th> Are there any html helper extensions to only show the display attribute without label, only plain text? My desired output is this: <th>Empresa</th> Thanks! EDIT I tried DisplayFor or DisplayTextFor as suggested, but they are not valid because they generate: <th>Amazon</th> They return the value of the property... I want the name from the Display attribute.

    Read the article

  • HTML Purifier: Removing an element conditionally based on its attributes

    - by pinkgothic
    As per the HTML Purifier smoketest, 'malformed' URIs are occasionally discarded to leave behind an attribute-less anchor tag, e.g. <a href="javascript:document.location='http://www.google.com/'">XSS</a> becomes <a>XSS</a> ...as well as occasionally being stripped down to the protocol, e.g. <a href="http://1113982867/">XSS</a> becomes <a href="http:/">XSS</a> While that's unproblematic, per se, it's a bit ugly. Instead of trying to strip these out with regular expressions, I was hoping to use HTML Purifier's own library capabilities / injectors / plug-ins / whathaveyou. Point of reference: Handling attributes Conditionally removing an attribute in HTMLPurifier is easy. Here the library offers the class HTMLPurifier_AttrTransform with the method confiscateAttr(). While I don't personally use the functionality of confiscateAttr(), I do use an HTMLPurifier_AttrTransform as per this thread to add target="_blank" to all anchors. // more configuration stuff up here $htmlDef = $htmlPurifierConfiguration->getHTMLDefinition(true); $anchor = $htmlDef->addBlankElement('a'); $anchor->attr_transform_post[] = new HTMLPurifier_AttrTransform_Target(); // purify down here HTMLPurifier_AttrTransform_Target is a very simple class, of course. class HTMLPurifier_AttrTransform_Target extends HTMLPurifier_AttrTransform { public function transform($attr, $config, $context) { // I could call $this->confiscateAttr() here to throw away an // undesired attribute $attr['target'] = '_blank'; return $attr; } } That part works like a charm, naturally. Handling elements Perhaps I'm not squinting hard enough at HTMLPurifier_TagTransform, or am looking in the wrong place(s), or generally amn't understanding it, but I can't seem to figure out a way to conditionally remove elements. Say, something to the effect of: // more configuration stuff up here $htmlDef = $htmlPurifierConfiguration->getHTMLDefinition(true); $anchor = $htmlDef->addElementHandler('a'); $anchor->elem_transform_post[] = new HTMLPurifier_ElementTransform_Cull(); // add target as per 'point of reference' here // purify down here With the Cull class extending something that has a confiscateElement() ability, or comparable, wherein I could check for a missing href attribute or a href attribute with the content http:/. HTMLPurifier_Filter I understand I could create a filter, but the examples (Youtube.php and ExtractStyleBlocks.php) suggest I'd be using regular expressions in that, which I'd really rather avoid, if it is at all possible. I'm hoping for an onboard or quasi-onboard solution that makes use of HTML Purifier's excellent parsing capabilities. Returning null in a child-class of HTMLPurifier_AttrTransform unfortunately doesn't cut it. Anyone have any smart ideas, or am I stuck with regexes? :)

    Read the article

  • Killing HTML nodes from shell

    - by hendry
    Need a solution to kill nodes like <footer>foobar</footer> and <div class="nav"></div> from many several HTML files. I want to dump a site to disk without the menus and footers and what not. Ideally I would accomplish this task using basic unix tools like sed. Since it's not XML I can't use xmlstarlet. Could anyone please suggest recipes, so I can ideally have a script running kill-node.sh 'div class="toplinks"' *.html to prune the bits I don't want. Thank you,

    Read the article

  • HTML encoding and decoding

    - by Zerotoinfinite
    Hi All, I am looking for a HTML editor, and I found many links through google like this http://online-html-editor.org/ Now I have written something on it: Let say the below content <div> <span style="font-weight: bold; font-size: 12pt; "> Heading</span></div> <div><br /> </div> The'la;skdlajlsdjansdkahskdkhaksdhkhaskdhkhaskhdkashdkhaksda <div>asdljalsjdljalsdjljalsdjljalsdjljalsdlajs;fl'ajduyasdahsldjkagsdhasvdjyhlasjdgklastgians,dkasjdlhakhsdl</div> <div>amsdka;sdlyasdalshdlj,asdh,asdjg,absdlasd/.malskdla'slduljds,vaskkd;jas;dl'asldu'alsdaskd;lk'as;d</div> <div>'a</div> <div>sd;jasldj;asdaklsdka'sld'sai'dkabskdm;;lsidaasfhdlasjd;ljaspodi;ajsd;lka'sld</div> <div>'</div> <div>ad'</div> <div>a;fj;ljas;dfjalshdoiauslkfdnkasfnlka's;dkap[sd'alsd;jlaksfdkajsdfh;alsd;</div> <div>asdkasjd;kaskd;as;dk;aksd;ajsdlkjalksjdlasjdkgasfkjashdjashdkasfdkjashkdasdjo[uipuhlkasdjlkajsdljalsjdlkajsdljaljsdljalsjdlkaslkjdlkasdjlasjdlkjaslkdjlasjdlasudqpeohw09iqwpekjqwehlj</div> <div><br /> </div> <div> <div> bool tt = new bool();</div> <div> if (txtStatus.Text == "true")</div> <div> tt = true;</div> <div> else</div> <div> tt = false;</div> <div><br /> </div> <div> </div></div> Now I want to save this content into the database and display as a normal text on a page. While extracting I can use Server.HTMLDecode, but I am facing problem while inserting this html data which I have copied from the sites. Please help. Thanks in advance.

    Read the article

  • How do I make Geany my default editor on Ubuntu?

    - by Programming Noob
    I actually want to change the default text editor on my Ubuntu 12.04 from nano to Geany. When I used this code: update-alternatives --config editor .. I don't see Geany in the list. So to add Geany, this is supposed to work right? update-alternatives --install /usr/bin/geany geany /usr/bin/geany 10 Also, on a side note, can you tell me if you would personally suggest me to change the default editor from nano to Geany, and why?

    Read the article

  • How do you save/export changes made in Firebug?

    - by blunders
    Using Firebug to edit CSS, how do I save/export changes made to the CSS? TOOLS: Firefox, Firebug MAJOR UPDATE: If you know of a way to lock the forward/back/refresh on a FireFox tab, please let me know. Otherwise, I've given up on using FireBug/FireDiff as an IDE for CSS, it's nice, but lol... press backspace at the wrong time and ALL your work is gone... funny. So, really like the browser highlighting to CSS/HTML in Firebug. Know any good CSS editors that do this? Really had hope FireBug would work, but for now only see it as being good for ad-hoc inspection and test; meaning using it for what it's made for. UPDATES: @Lèse majesté: Just as an update, "Web Developer add-on" does let you edit CSS, but it does not let you edit/save CSS changes made by Firebug. Meaning you use Firebug to ID and maybe test changes, but it does not let you save the changes from Firebug. Here's a "how to" covering how to use them together: FF + FB + WD @Lèse majesté: Still playing around with FireDiff. It works okay, found one bug already (although I'm just working around it), and there's no "how to" I've been able to find, so I'm just trying every feature and clicking around... (for example, to export a diff you must be over the last item in the list, right click, and select as "Save Diff". The ".diff" is just a text file, no idea why at this point the ext is .diff.

    Read the article

  • It is inconsiderate to place editor settings inside code files?

    - by Carlos Campderrós
    I know this is kind of a subjective question, but I'm curious if there's any good reason to place (or not place) editor settings inside code files. I'm thinking in vi modelines, but it is possible that this applies to other editors. In short, a vi modeline is a line inside a file that tells vi how to behave (indent with spaces or tabs, set tabwidth to X, autoindent by default or not, ...) that is placed inside a comment, so it won't affect the program/compiler when running. In a .c file it could be similar to // vim: noai:ts=4:sw=4 On one hand, I think this shouldn't be inside the file, as it is an editor setting and so belongs to an editor configuration file or property. On the other hand, for projects involving developers outside one company (that are not imposed an editor/settings) or collaborators on github/bitbucket/... it is an easy way to avoid breaking the code style (tabs vs spaces for example), but only for the ones that use that editor though. I cannot see any powerful enough reason to decide for or against this practice, so I am in doubt of what to do.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >