Search Results

Search found 14 results on 1 pages for 'sandhurst'.

Page 1/1 | 1 

  • Load PDF from Memory ASP.Net

    - by Sandhurst
    I am using ITextSharp to generate pdf on the fly and then saving it to disk and display it using Frame. The Frame has an attribute called src where I pass the generated file name. This all is working fine what I want to achieve is passing the generated pdf file to Frame without saving it to disk. HtmlToPdfBuilder builder = new HtmlToPdfBuilder(PageSize.LETTER); HtmlPdfPage first = builder.AddPage(); //import an entire sheet builder.ImportStylesheet(Request.PhysicalApplicationPath + "CSS\\Stylesheet.css"); string coupon = CreateCoupon(); first.AppendHtml(coupon); byte[] file = builder.RenderPdf(); File.WriteAllBytes(Request.PhysicalApplicationPath+"final.pdf", file); printable.Attributes["src"] = "final.pdf";

    Read the article

  • Populate Dynamically created ASPX Page

    - by Sandhurst
    Well The title might be a lil confusing, what I am currently doing is creating an aspx form dynamically and saving its data by using Server.Transfer("PrssPage.aspx"). On ProcessPage.aspx I am using the Previous Page property to save the data entered by the user using the dynamically created form. Each Dynamic Form is provided an ID for example 123.aspx Now what I want to achieve is to repopulate the dynamically created aspx page with the user input values from database, plz note here that I do not have an aspx.cs page getting dynamically generated. I am only generating aspx page. Any suggestion ?

    Read the article

  • Convert HTML to PDF in .NET

    - by SandHurst
    I want to generate PDF by passing HTML contents to a function. I have made use of ItextSharp for this but it does not perform well when it encounters Table and the layout just gets messy. Is there any free library available ?

    Read the article

  • Using Build Manager Class to Load ASPX Files and Populate its Controls

    - by Sandhurst
    I am using BuildManager Class to Load a dynamically generated ASPX File, please note that it does not have a corresponding .cs file. Using Following code I am able to load the aspx file, I am even able to loop through the control collection of the dynamically created aspx file, but when I am assigning values to controls they are not showing it up. for example if I am binding the value "Dummy" to TextBox control of the aspx page, the textbox remains empty. Here's the code that I am using protected void Page_Load(object sender, EventArgs e) { LoadPage("~/Demo.aspx"); } public static void LoadPage(string pagePath) { // get the compiled type of referenced path Type type = BuildManager.GetCompiledType(pagePath); // if type is null, could not determine page type if (type == null) throw new ApplicationException("Page " + pagePath + " not found"); // cast page object (could also cast an interface instance as well) // in this example, ASP220Page is a custom base page System.Web.UI.Page pageView = (System.Web.UI.Page)Activator.CreateInstance(type); // call page title pageView.Title = "Dynamically loaded page..."; // call custom property of ASP220Page //pageView.InternalControls.Add( // new LiteralControl("Served dynamically...")); // process the request with updated object ((IHttpHandler)pageView).ProcessRequest(HttpContext.Current); LoadDataInDynamicPage(pageView); } private static void LoadDataInDynamicPage(Page prvPage) { foreach (Control ctrl in prvPage.Controls) { //Find Form Control if (ctrl.ID != null) { if (ctrl.ID.Equals("form1")) { AllFormsClass cls = new AllFormsClass(); DataSet ds = cls.GetConditionalData("1"); foreach (Control ctr in ctrl.Controls) { if (ctr is TextBox) { if (ctr.ID.Contains("_M")) { TextBox drpControl = (TextBox)ctr; drpControl.Text = ds.Tables[0].Rows[0][ctr.ID].ToString(); } else if (ctr.ID.Contains("_O")) { TextBox drpControl = (TextBox)ctr; drpControl.Text = ds.Tables[1].Rows[0][ctr.ID].ToString(); } } } } } } }

    Read the article

  • Create a Setup File Windows.Net C#

    - by Sandhurst
    I have created a windows application setup program, it needs to have a text file in the application folder. The file is also included while creating the setup. Once the setup successfully completes and my program tries to modify the file based on user input, its simple throwing an exception. I am using Windows 7 Home Premium OS. Any suggestion/help will be great to overcome this issue.

    Read the article

  • Delete Duplicate records from large csv file C# .Net

    - by Sandhurst
    I have created a solution which read a large csv file currently 20-30 mb in size, I have tried to delete the duplicate rows based on certain column values that the user chooses at run time using the usual technique of finding duplicate rows but its so slow that it seems the program is not working at all. What other technique can be applied to remove duplicate records from a csv file Here's the code, definitely I am doing something wrong DataTable dtCSV = ReadCsv(file, columns); //columns is a list of string List column DataTable dt=RemoveDuplicateRecords(dtCSV, columns); private DataTable RemoveDuplicateRecords(DataTable dtCSV, List<string> columns) { DataView dv = dtCSV.DefaultView; string RowFilter=string.Empty; if(dt==null) dt = dv.ToTable().Clone(); DataRow row = dtCSV.Rows[0]; foreach (DataRow row in dtCSV.Rows) { try { RowFilter = string.Empty; foreach (string column in columns) { string col = column; RowFilter += "[" + col + "]" + "='" + row[col].ToString().Replace("'","''") + "' and "; } RowFilter = RowFilter.Substring(0, RowFilter.Length - 4); dv.RowFilter = RowFilter; DataRow dr = dt.NewRow(); bool result = RowExists(dt, RowFilter); if (!result) { dr.ItemArray = dv.ToTable().Rows[0].ItemArray; dt.Rows.Add(dr); } } catch (Exception ex) { } } return dt; }

    Read the article

  • PHP OAuth Twitter

    - by Sandhurst
    I have created a twitter app which I am using to post tweets. The problem that I am not able to resolve is everytime I have to allow access to my application. so lets say I need to tweet three messages, so all the three times I have to allow access to my app. I just need that once user has allowed access to my app, next time he should only be asked to allow acces is that when he/she relogins. Here's my code that I am using Share content on twitter"; include 'lib/EpiCurl.php'; include 'lib/EpiOAuth.php'; include 'lib/EpiTwitter.php'; include 'lib/secret.php'; $twitterObj = new EpiTwitter($consumer_key, $consumer_secret); $oauth_token = $_GET['oauth_token']; if($oauth_token == '') { $url = $twitterObj-getAuthorizationUrl(); echo ""; echo "Sign In with Twitter"; echo ""; } else { $twitterObj-setToken($_GET['oauth_token']); $token = $twitterObj-getAccessToken(); $twitterObj-setToken($token-oauth_token, $token-oauth_token_secret); $_SESSION['ot'] = $token-oauth_token; $_SESSION['ots'] = $token-oauth_token_secret; $twitterInfo= $twitterObj-get_accountVerify_credentials(); $twitterInfo-response; $username = $twitterInfo-screen_name; $profilepic = $twitterInfo-profile_image_url; include 'update.php'; } if(isset($_POST['submit'])) { $msg = $_REQUEST['tweet']; $twitterObj-setToken($_SESSION['ot'], $_SESSION['ots']); $update_status = $twitterObj-post_statusesUpdate(array('status' = $msg)); $temp = $update_status-response; header("Location: MessageStatus.html"); exit(); } ?

    Read the article

  • Red Sand – An Awesome Fan Made Mass Effect Prequel [Short Movie]

    - by Asian Angel
    Welcome to Mars where humanity has just discovered the Prothean Ruins and Element Zero, but danger abounds as the Red Sand terrorist group seeks to claim Mars for themselves! If you love the Mass Effect game series, then you will definitely want to watch this awesome fan made prequel set 35 years before the events of the first game. Synopsis From YouTube: Serving as a prequel to the MASS EFFECT game series,”Red Sand” is set 35 years before the time of Commander Shepard and tells the story of the discovery of ancient ruins on Mars. Left behind by the mysterious alien race known as the Protheans, the ruins are a treasure trove of advanced technology and the powerful Element Zero, an energy source beyond humanity’s wildest dreams. As the Alliance research team led by Dr. Averroes (Ayman Samman) seeks to unlock the secrets of the ruins, a band of marauders living in the deserts of Mars wants the ruins for themselves. Addicted to refined Element Zero in the form of a narcotic nicknamed “Red Sand” which gives them telekinetic “biotic” powers, these desert-dwelling terrorists will stop at nothing to control the ruins and the rich vein of Element Zero at its core. Standing between them and their goal are Colonel Jon Grissom (Mark Meer), Colonel Lily Sandhurst (Amy Searcy), and a team of Alliance soldiers tasked with defending the ruins at all costs. At stake – the future of humanity’s exploration of the galaxy, and the set up for the MASS EFFECT storyline loved by millions of gamers worldwide. RED SAND: a Mass Effect fan film – starring MARK MEER [via Geeks are Sexy] 7 Ways To Free Up Hard Disk Space On Windows HTG Explains: How System Restore Works in Windows HTG Explains: How Antivirus Software Works

    Read the article

1