Search Results

Search found 4141 results on 166 pages for 'render'.

Page 11/166 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Render a user control ascx

    - by Jeremy
    I want to use an ascx as a template, and render it programatically, using the resulting html as the return value of an ajax method. Page pageHolder = new Page(); MyUserControl ctlRender = (MyUserControl)pageHolder.LoadControl(typeof(MyUserControl),null); pageHolder.Controls.Add(ctlRender); System.IO.StringWriter swOutput = new System.IO.StringWriter(); HttpContext.Current.Server.Execute(pageHolder, swOutput, false); return swOutput.ToString(); This all executes, and the Page Load event of the user control fires, but the StringWriter is always empty. I've seen similar code to this in other examples, what am I missing?

    Read the article

  • Render a partial from a task in Symfony 1.4

    - by Cryo
    I'm trying to render a partial in a Symfony task and having no luck. I found docs in 1.1 that say to just call get_partial() but apparently that's no longer readily available in 1.4. I tried loading the helper manually with sfLoader::getHelpers('Partial'); but I get "Class sfLoader not found". Any help would be greatly appreciated. For reference what I'm trying to do is generate an HTML file called 'header.html' from my global header partial used in all of my layouts for inclusion in a third-party forum I'm integrating (Simple Machines/SMF).

    Read the article

  • Assistance using respond_to to find the right actions to render PDF in ruby on rails

    - by Angela
    Hi, I am trying out Prince with the Princely plugin, which is supposed to format templates that have the .pdf into a PDF generator. Here is my controller: class TodoController < ApplicationController def show_date @date = Date.today @campaigns = Campaign.all @contacts = Contact.all @contacts.each do |contact| end respond_to do |format| format.html format.pdf do render :pdf => "filename", :stylesheets => ["application", "prince"], :layout => "pdf" end end end end I changed the routes.db to include the following: map.connect ':controller/:action.:format' map.todo "todo/today", :controller => "todo", :action => "show_date" My expected behavior is when I enter todo/today.pdf, it tries to execute show_date, but renders according to the princely plugin. Right now, it says cannot find action. What do I need to do to fix this?

    Read the article

  • How to Render Partial View into a String

    - by DaveDev
    Hi all, I have the following code: public ActionResult SomeAction() { return new JsonpResult { Data = new { Widget = "some partial html for the widget" } }; } I'd like to modify it so that I could have public ActionResult SomeAction() { // will render HTML that I can pass to the JSONP result to return. var partial = RenderPartial(viewModel); return new JsonpResult { Data = new { Widget = partial } }; } is this possible? Could somebody explain how? note, I edited the question before posting the solution.

    Read the article

  • render HTML (convert to bitmap)

    - by MK
    Can somebody recommend the best (and preferably portable) way to render HTML documents onto a bitmap? As far as I understand my main 2 options are WebKit and Gecko, but I wasn't able to find a good starting point on how to do it. When I last tried doing this 5 years ago, I ended up using Gecko to send the document to a printer, which is not really what I need. I need rendering to a in-memory bitmap. To clarify: server side, no Java, no .NET, batch processing, performance, not interactive, no Javascript.

    Read the article

  • Download office document without the web server trying to render it

    - by Dan Revell
    I'm trying to download an InfoPath template that's hosted on SharePoint. If I hit the url in internet explorer it asks me where to save it and I get the correct file on my disk. If I try to do this programmatically with WebClient or HttpWebRequest then I get HTML back instead. How can I make my request so that the web server returns the actual xsn file and doesn't try to render it in html. If internet explorer can do this then it's logical to think that I can too. I've tried setting the Accept property of the request to application/x-microsoft-InfoPathFormTemplate but that hasn't helped. It was a shot in the dark.

    Read the article

  • Render page as a picture

    - by Sebastian
    I have question to Java or C# programmers. I want to render some pages in various browsers mainly Firefox and IE and save it as a picture. I have not any serious experience in Java/.Net. Is there any libs/tools for such tasks? I thought about some FF extensions for example but I don't know how to do it in IE. Is the in .Net some libs for dealing with it? Maybe some ActiveX? Any sugestions?

    Read the article

  • rsvg doesn't render linked images

    - by colinmarc
    I use the python rsvg bindings to render an svg image into cairo and save to file, which mostly works. But if the svg file contains a linked image, like so: <image href="static/usrimgs/tmpDtIKpx.png" x="10" y="10" width="600px" height="400px"></image> the image doesn't show up in the final file (the rest of the svg renders just fine). The relative path is correct based on where the script is running, but I'm guessing there's some problem with the fact that it would normally be a relative URL, not a relative filepath. How do I get around this?

    Read the article

  • 302 Redirect to Images in IE8 do not render image

    - by empire29
    I am helping migrate a legacy application. One of the requirements is we are able to handle requests for old images. What we have is: New site on new.com Old site on old.com Images to links (imported content) point to /imgs/cat.png however the actual image is hosted on old.com/assets/images/cat.png (for now). <img src="/imgs/cat.png"/> I setup a redirect for all png, jpg, jpeg, gif that 302's requests for new.com/imgs/(.*).(png|jpg|jpeg|gif) to http://old.com/assets/images/$1.$2 Everything works find in Chrome, Firefox and IE9 - however it was noted in IE8 the image does not render. Its possible that it has the same issue in IE7, 6 and 5.5 however I have not been able to test this. Does anyone know why this is happening and how to fix? I tried setting the contentType header on the response of the 302's to image/(png|jpg|jpeg|gif) and this did not have any impact. Any insight would be appreciated.

    Read the article

  • Dynamically render partial templates using mustache

    - by btakita
    Is there a way to dynamically inject partial templates (and have it work the same way in both Ruby & Javascript)? Basically, I'm trying to render different types of objects in a list. The best I can come up with is this: <div class="items"> {{#items}} <div class="item"> {{#is_message}} {{< message}} {{/is_message}} {{^is_message}} {{#is_picture}} {{< picture}} {{/is_picture}} {{^is_picture}} {{/is_picture}} {{/is_message}} </div> {{/items}} </div> For obvious reasons, I'm not super-psyched about this approach. Is there a better way? Also note that the different types of models for the views can have non-similar fields. I suppose I could always go to the lowest common denominator and have the data hash contain the html, however I would rather use the mustache templates.

    Read the article

  • Rails 3 render :partials

    - by user297221
    Hi guys. I am migrating my 1.8.7 rails app to rails 3. But I have a problem with a partial: I have the following partial: in my cms controller : @clients = Client.all group = render_to_string :layout = 'layouts/window', :partial = 'clients/index' in my "clients/index" partial: <%= render :partial = 'clients/item', :collection = @clients % This worked great with rails 1.7.8 but with rails 3 only the partial in the index get's rendered!. So, to clarify this, the group variable in the controller doesn't get the html from the layout. Also the weird thing is that the window layout is _window.erb (if I do window.html.erb or just window.erb rails can't find it which is strange). Does anybody know if this behavior is normal for rails 3? thanxs!

    Read the article

  • Ruby-Graphwiz does not render png

    - by auralbee
    I just tried the ruby-graphwiz gem (http://github.com/glejeune/Ruby-Graphviz). I followed the instructions (installed Graphwiz, gem and dependencies) and tried the example from the Github page. Unfortunately I am not able to render any output image (png,dot). # Create a new graph g = GraphViz.new( :G, :type => :digraph ) # Create two nodes hello = g.add_node( "Hello" ) world = g.add_node( "World" ) # Create an edge between the two nodes g.add_edge( hello, world ) # Generate output image g.output( :png => "hello_world.png" ) When I run the skript from the console I get no error message but also no output as expected. What could be the problem? Folders have read/write access for everybody. Thanks in advance. By the way, I´m working on a Mac (Leopard 10.6).

    Read the article

  • Drupal: How to render a form and table on same page

    - by Aaron
    Can someone help me render a form and table on the same page? I'm sure it's easy, but can't think of how to do it. Here's hook_menu: function ncbi_subsites_menu() { $items = array(); $items['admin/content/ncbi_subsites'] = array( 'title' => 'NCBI Subsites Module', 'description' => 'Informs Drupal about NCBI subsites as defined by the Content Inventory database', 'page callback' => 'ncbi_subsites_show_main_page', 'access arguments' => array( 'administer site configuration' ), 'type' => MENU_NORMAL_ITEM, ); return $items; } Here's the callback: function ncbi_subsites_show_main_page() { $subsites = ncbi_subsites_get_subsites_from_inventory(); // fnc returns associative array from inventory, defined in include return ncbi_subsites_make_table( $subsites ); } In the callback I call some helper functions that return a themed, paged table. What I want is a small form above the table. How would I that?

    Read the article

  • Render an asynchronous report, wider than the screen, without extra scrollbars

    - by Dubs
    I have an asynchronous local SSRS 2005 report that is of variable height and width, but routinely is bigger than the screen. I want to render it full size so that some of the report renders off screen and the only scrollbars the user sees are the ones on the browser window. What is the best way to accomplish this? The only method that I've found that even comes remotely close to what I want is to set static width/height values that are much larger than the report will ever be. But, this is undesirable since it leaves so much extra whitespace in the browser window. Has anyone had success rendering asynchronous reports without the extra scrollbars?

    Read the article

  • Render Order via HTML or CSS

    - by Bullines
    What is the best practice is in the case of altering the render order of elements on a webpage. For example, I have two DIVs that are to be displayed on a page: <div id="appleSection"> <!-- Apple DIVs, content, form elements, etc --> </div> <div id="orangeSection"> <!-- Orange DIVs, content, form elements, etc --> </div> Depending on user selection (perhaps by country or something), the order which the DIVs are presented to the user can differ. Certain conditions present appleSection above orangeSection, and for other conditions, their order is reversed. If the core logic of the page is the same regardless, is it a best practice to determine order on the server-side (perhaps via two pages that differ in the order of the DIVs), or is it more appropriate to have just a single page and use CSS to control whether appleSection is above orangeSection or vice versa?

    Read the article

  • WPF: Menu items and combo boxes don't render in Windows 7 64-bit

    - by lilserf
    I'm trying to use an existing internal WPF application (I do have access to the source), but it was developed on XP and I'm using Windows7 64-bit. When I click (for instance) the File menu, 90% of the time I see no drop-down menu at all. The menu still exists - I can use the arrow keys to navigate up and down and choose an option if I happen to know the order of the options, but nothing renders at all. The other 10% of the time, the menu or some portion of it DOES render, but as I move the cursor up and down I get graphical corruption or disappearing options until I end up back at the "no menu is visible at all" state. This is also true of combo boxes within the application - they show no data when I drop them down, but I can arrow down and choose an entry. Microsoft has some advice about WPF rendering issues here but none of these steps has helped with my issue.

    Read the article

  • Render view as string when Ajax request to view is made

    - by mare
    I have my views render to route requests like /controller/action (for instance, /Page/Create), so pretty classic. I am creating a form where view will be loaded through AJAX request with jQuery get(), so essentially I need my Views or to be precise, my controller actions, to return plain HTML string when an AJAX request is made to the route that renders the View. I want to use the same views as for normal requests, so I cannot afford to create any new views. It is something like calling RenderPartial("MyViewUserControl") but from inside the JS code.

    Read the article

  • Render Silverlight Animation to video file

    - by VOliveira
    Hi guys I need to be able to render a silverlight storyboard animation to video. The animated content itself could be simple UIElements, Images or even two or more videos playing at the same time. Several ideas came to mind like RenderTargetBitmap on a single frame basis, but: 1) I've never tested this against video embedded content 2) Don't know how to actually compose the video from the generated images. Expression Encoder was also on my mind, but I don't know if it's possible to integrate it in a Silverlight/XBAP app to fulfill what's expected from it. What's your opinion on this?

    Read the article

  • Ajax render attribute don't work in a h:dataTable in JSF2

    - by u2ix
    Hello everybody, I have some problem's with a simple application in JSF 2.0. I try to build a ToDo List with ajax support. I have some todo strings which I display using a datatable. Inside this datatable I have a commandLink to delete a task. The problem is now that the datatable don't get re-rendered. <h:dataTable id="todoList" value="#{todoController.todos}" var="todo"> <h:column> <h:commandLink value="X" action="#{todoController.removeTodo(todo)}"> <f:ajax execute="@this" render="todoList" /> </h:commandLink> </h:column> <h:column> <h:outputText value="#{todo}"/> </h:column> </h:dataTable> Thanks for your help. Edit (TodoController): @ManagedBean @SessionScoped public class TodoController { private String todoStr; private ArrayList<String> todos; public TodoController() { todoStr=""; todos = new ArrayList<String>(); } public void addTodo() { todos.add(todoStr); } public void removeTodo(String deleteTodo) { todos.remove(deleteTodo); } /* getter / setter */ }

    Read the article

  • Flash/Flex: "Warning: filter will not render" problem

    - by davidemm
    In my flex application, I have a custom TitleWindow that pops up in modal fashion. When I resize the browser window, I get this warning: Warning: Filter will not render. The DisplayObject’s filtered dimensions (1286, 107374879) are too large to be drawn. Clearly, I have nothing set with a height of 107374879. After that, any time I mouse over anything in the Flash Player (v. 10), the CPU churns at 100%. When I close the TitleWindow, the problem subsides. Sadly, the warning doesn't seem to indicate which DisplayObject object is too large to draw. I've tried attaching explicit height/widths to the TitleWindow and the components within, but still no luck. [Edit] The plot thickens: I found that the problem only occures when I set the PopUpManager's createPopUp modal parameter to "true." I don't see the behavior when modal is set to "false." It's failing while applying the graying filter to other components that comes from being modal. Any ideas how I can track down the one object that has not been initialized but is being filter during the modal phase? Thanks for reading.

    Read the article

  • Render SVG font in Adobe Illistrator or Corel Draw

    - by Viktor Burdeinyi
    Hello! I'm developing a project that produces SVG files with custom embed fonts. SVG font definition I compose as SVG font tag with help of http://www.fontsquirrel.com/fontface/generator or Batik SVG Toolkit. The resulted SVG file I try to open in following applications: Adobe Illustrator CS4 - text has default font and message noticed about font not found in system CorelDRAW X5 - text has default font and any messages don't noticed Batik SVG Browser (Squiggle) - renders text correctly The problem is all modern typographies use CorelDRAW and Abode Illustrator for print vector graphic and them render not correctly SVG. Solution As for me, I see follow solutions: Save the text with custom font as SVG path. This will work but, I can't find any solution that can convert text + TTF to SVG path data; Use other vector format, f.e. AI, EPS or CDR. This solution is difficult for me, because I use SVG paths as part of input data; Recommend our users to use Batik SVG Browser (Squiggle) or any other application which are based on Batik SVG Toolkit library. Batik SVG Toolkit requires Java runtime :( If anyone know some knowledge to open SVG embed fonts in Adobe Illustrator or CorelDRAW please share them. I would be grateful for any help. Thank you. -Viktor Burdeinyi

    Read the article

  • Render User Controls and call their Page_Load

    - by David Murdoch
    The following code will not work because the controls (page1, page2, page3) require that their "Page_Load" event gets called. using System; using System.IO; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using iTextSharp.text; using iTextSharp.text.html.simpleparser; using iTextSharp.text.pdf; public partial class utilities_getPDF : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // add user controls to the page AddContentControl("controls/page1"); AddContentControl("controls/page2"); AddContentControl("controls/page3"); // set up the response to download the rendered PDF... Response.ContentType = "application/pdf"; Response.ContentEncoding = System.Text.Encoding.UTF8; Response.AddHeader("Content-Disposition", "attachment;filename=FileName.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache); // get the rendered HTML of the page System.IO.StringWriter stringWrite = new StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); this.Render(htmlWrite); StringReader reader = new StringReader(stringWrite.ToString()); // write the PDF to the OutputStream... Document doc = new Document(PageSize.A4); HTMLWorker parser = new HTMLWorker(doc); PdfWriter.GetInstance(doc, Response.OutputStream); doc.Open(); parser.Parse(reader); doc.Close(); } // the parts are probably irrelevant to the question... private const string contentPage = "~/includes/{0}.ascx"; private void AddContentControl(string page) { content.Controls.Add(myLoadControl(page)); } private Control myLoadControl(string page) { return TemplateControl.LoadControl(string.Format(contentPage, page)); } } So my question is: How can I get the controls HTML?

    Read the article

  • Making Firefox render canvas text the same as CSS text

    - by Dan Forys
    I've been experimenting with the canvas tag and Javascript. I've made a page that takes Tweets from the Twitter public timeline and animates them into view. It works by using a canvas element in the background for the animation. When the animation is complete, it creates a div element with the same text over the top. I do this so that the tweet text is selectable and links are clickable. Now, in Safari, Chrome and even Opera, the canvas text and div text look almost exactly the same. Yet in Firefox, the size of the text is different enough to make it 'jump' at the point it changes into the div. Does anyone know how to make Firefox render the text the same on the canvas element and the div using CSS? Or is this a rendering inconsistency with the engine. I have put the page on my website if you want to see what I mean. Now for the code: The CSS I'm using for rendering the div contains: line-height: 21px; font-weight: 100; font-family: Georgia, "New Century Schoolbook", "Nimbus Roman No9 L", serif; font-size: 20px; For rendering on the canvas I'm using: this.context.font = this.scale + 'px Georgia'; this.context.fillStyle = "white"; this.context.strokeStyle = 'white'; this.context.fillText(this.text, 0, 0); this.context.strokeText(this.text, 0, 0); where this.scale is an animated scale factor that finishes at 20px exactly. So, to recap, I'm using the same font and ending up at the same px size, yet Firefox renders the text differently between Canvas and CSS. (edit) Here's a screenshot example: First line is the text animating in using canvas, second line is the resulting div.

    Read the article

  • Render label for a field inside ASP.NET MVC 2 editor templates

    - by artvolk
    I'm starting to use DataAnnotations in ASP.NET MVC and strongly typed template helpers. Now I have this in my views (Snippet is my custom type, Created is DateTime): <tr> <td><%= Html.LabelFor(f => Model.Snippet.Created) %>:</td> <td><%= Html.EditorFor(f => Model.Snippet.Created)%></td> </tr> The editor template for DateTime is like this: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.DateTime>" %> <%=Html.TextBox("", Model.ToString("g"))%> But now I want to put inside editor template the whole <tr>, so I'd like to have just this in my view: <%= Html.EditorFor(f => Model.Snippet.Created)%> And something like this in editor template, but I don't know how to render for for label attribute, it should be Snippet_Created for my example, the same as id\name for textbox, so pseudo code: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.DateTime>" %> <tr> <td><label for="<What to place here???>"><%=ViewData.ModelMetadata.DisplayName %></label></td> <td><%=Html.TextBox("", Model.ToString("g"))%></td> </tr> The Html.TextBox() have the first parameter empty and id\name for textbox is generated corectly. Thanks in advance!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >