Can Create New PDF Files Based On A Template Where Some Text Will Be Replaced?
Sep 5, 2010
I'm developing a CMS aplication in ASP .Net using WebForms and I'm looking for a way to create new PDF files based on a template.
This feature will be used to generate contracts where some placeholders will be replaced with the customer data.
Edited: The templates will be static, the main content will never change from customer to customer, only some text in the beginning that will contain the placeholders to recive the customer data. The catch is that I must allow the owner of the application to upload new templates in PDF, with the predetermined placeholders in it to allow the replacement to occur.
I'm developing a CMS aplication in ASP .Net using WebForms and I'm looking for a way to create new PDF files based on a template.
This feature will be used to generate contracts where some placeholders will be replaced with the customer data.
What's the best approach to do that?
Edited: The templates will be static, the main content will never change from customer to customer, only some text in the beginning that will contain the placeholders to recive the customer data. The catch is that I must allow the owner of the application to upload new templates in PDF, with the predetermined placeholders in it to allow the replacement to occur.
I want to change text of text object in crystal report (.rpt file). The datasource for the report is a datatable which consists of a column named sale, if it is '0' then I want to display the text of text object as 'sale' and if it is '1' then I want to display the text of text object as 'lease'. how to add formula and based upon the result of formula I have to change the text of text object being displayed.
My Visual Studio 2005 program doesn't open CSS files properly - when I open them in VS, it opens them as a text file. It is annoying because if I do something wrong, it doesn't show up the error and I have to sift through it all to try and find out what is wrong. Plus it doesn't show up the hints for the attributes.
I need to create temp file on the clint side So, i read that files can be created on the folder of internet temp file. how I can do that?how I can get the path of the temp folder?I need VB code
My website is made up of .aspx pages.On some pages, an email gets programmatically sent, and I find it most convenient to have.html email templates (which I can edit in Visual Studio) which I load and manipulate programmatically, and then send as the body of an email. The html files are never displayed to users on the site.At the moment, I store these emails in an Email subdirectory of App_LocalResources, as this seemed like the logical place to put them.
But whenever I update an email on my IIS 6 server, then the IIS server shuts down and restarts, stating: Shutdown Message: Change Notification for critical directories. App_LocalResources dir change or directory rename HostingEnvironment initiated shutdown Change Notification for critical directories. App_LocalResources dir change or directory rename HostingEnvironment caused shutdown.
I don't want to restart my webserver every time (and lose session information) any time I change one of my email templates.
So where is the best suggested location for storing these .html files, as part of the project?
The above is my gridview item template, I have used this javascript for row total
[Code]....
gridview row databound code behind
[Code]....
The above code is getting row calaculated on key up. With the same code in need column total also. I need total of column quantity and total in their respective footer textbox.
When I use TT files to generate code, output files within Websites ar never properly generated. The resut is always some "Chinese character garbage", and the generated extension is always .cs (whatever the given outputextension may be)Generating text files works fine in class libraries, MVC websites and other "projects".Just not in plain websites. Is this a known issue, am I forgetting some swith or doing something wrong, can or can I not fix this?UPDATE: It seems to be a problem with the Tangible T4 Editor, after uninstalling this tool, it seems to work fine. However, I've lost syntax highlighting and intellisense then.Since this is an external tool, I don't think this forum covers that scope.
I am using VS2008.I am binding dynamic datatable to gridview. I have few dropdowns and textboxes in gridview. I have dropdownlist(ddlTrCodeNw_)in gridview foooter template. Based on the selection of Trcode value few controls will be enabled,disabled,visible,hide. in gridview.
<asp:GridView ID="gvAPPost" runat="server" Width="100%" ShowFooter="true" AllowPaging="true" AutoGenerateColumns="false" onrowcommand="gvAPPost_RowCommand" onrowdatabound="gvAPPost_RowDataBound" > <Columns> <asp:TemplateField HeaderText="Discount %" Visible="false"> <FooterTemplate> <asp:TextBox ID="txtDiscountPerNw" runat="server" Width="40px" Enabled="false" Visible="false" ></asp:TextBox > </FooterTemplate> <ItemTemplate> <asp:TextBox ID="txtDiscountPer" runat="server" Width="40px" Enabled="false" Visible="false"></asp:TextBox > </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Intially I set TemplateField HeaderText also Visible="false". so i have written the condition in ddlTrCodeNw_SelectedIndexChanged. Now when if(ddlTrCodeNw.SelectedValue=="24") { txtDepstNw.Enabled = true; txtDepstIncNw.Enabled = true; txtCrdtNw.Enabled = false; txtCrdtIncNw.Enabled = false; lblDiscTrcodeNw.Visible = true; // I want to show this TemplateField HeaderText also when i need. }
I can I show TemplateField HeaderText also whenever i need.
I have atleast 10 websites that have different css,html,javasacripts and webconfig. But the same code behind files.With this design everything is hard to maintain. So I decided to work on it and I started moving all the queries in the code beghind file to stored procedures. Since every website uses the same database.
What I have decided is to make use of themes and multiple master pages? IS this the best way to go about it?
Also lets say I have two templates. There is site A and site B. both using different templates. And have pages Home About Us and Contact.
Now would I be creating three different masterpages? for each template so 6 in total? ( since none of the templates are supposed to look the same)
or Should I just create two masterpages? if so how would I manage the html of the page so it looks different?
My plain texts are image links and pdf URLs from a database table, in groups, in the correct order but I'm not sure how to render them correctly (sample image below shows what I am trying to render)
Is there any way to make a repeater template intelligent enough to render an "image link" OR "pdf link" based off the [type] column returned in the record?
table: pk Name Type (image or pdf) URL Description URL_Thumbnail (if image) GroupId (associate these records to each other) OrderNumber (order of these records within their GroupId)
I recently found out about the andAlso operator, and I understood that it will only evaluate the right condition if the left is true, I thought this could help tidy my code so replaced nested ifs with AndAlso.
Private ds As DataSet ----------- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ds = nothing If Not ds.Tables(0) Is Nothing AndAlso ds.Tables(0).Rows.Count > 0 Then end if end sub
I deliberately set my ds to nothing to replicate a database error and it gave me an object reference error.
I am using SQL Server 2008 Web Edition and it seems my SQL queries are automagically having the double quotes replaced with ' + CHAR(34) + '. I am trying to pin down why this is happening, I am using Delphi with ASP.NET and using the ADO.NET object for the SQL.
I recently noticed that when a dll is replaced at my web site, the site will take a long time to come back, even though the dll is only used by limited pages. I generally have to reset IIS to make the web site come back faster. Is this the normal behavior? or some settings need to be ajusted to avoid this?
I am trying to replace a value in a drop down box. The replacing works fine (after help from this fine community) but afterwards the slide function stops working. I can't find any errors so I'm asking if this could be related to how jQuery and javaScript works? Are elements "mapped" to the DOM on load and if so; would that imply that replacing a div with another div would result in jQuery loosing track of the divs? I use this code to check if a div is clicked:
$(document).ready(function () { $('.button_slide').click(function () { var num = $(this).attr('rel'); $('div.content_slide:not(.' + num + ') ').slideUp(400); $('div.' + num).slideToggle(400); }); return false; });
This is the jQuery that drops down the box: $(function () { $('.click_button').click(function () { var num = $(this).attr('rel'); $('.button_slide[rel="' + num + '"]').replaceWith("<div class='button_slide' rel='" + num + "' >" + $(this).val() + "</div>"); $('div.content_slide').slideUp(600); }); });
I'm pulling my hair on this one and jQuery isn't my stronger side... How would you solve this?
i have a radeditor in my webform and it posts back. if i type any thing in the editor and press enter key for new line and then use any control in the page which reloads the page, then the next line character in the editor gets replaced by $0 and other text remains same as earlier. it happens in SAFARI.
Ex. aasdads dsdsds the above text replaced by: aasdads$0dsdsds$0
in my project i would like to save pdf files in database, how to save pdf files in database ? along with that i would like to create create a search page to search for pdf files with PDF file names , how to accoplish these things
I am building an ASP.NET 3.5 Web Application and I am NOT using the membership provider for security. In the application I have a role named Admin and all the files for this role are inside the Security folder in the project. Currently for all the pages inside the security folder I am checking to see if the logged in user's role is an Admin or not. This to me seems very redundant, can do something like "If the user is requesting a page inside the security folder then check his role".
I have an asp.net web app. I have secure parts to the website and currently I have it setup so that people can login with their domain accounts. The are three secure sections to the site, all of which require files of interest be displayed to the user so they can download them.
Okay so this is how I see it working, people come to the home page and select on one of the three options. At this point they are prompted for there domain password then they are navigated to the secure page and a bit of code populates the page with file downloads based on who they are logged in as.
The files themselves will be uploaded to the website and kept in folders named after the username. so for instance the user edwardh would be displayed the files in the folder /downloads/edwardh.