Embedd - PDF and Graphics Control

HOW TO:
Use in .ASP.NET 
Page - Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestEmbed.aspx.cs" Inherits="TestEmbed" %>

<%@ Register Assembly="ncToolControls" Namespace="ncToolControls" TagPrefix="nc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>        
        <p align="center"><nc:GraphicEmbedded ID="ctrl1" GraphicWidth=800 GraphicHeight=600 runat="server" /></p>
         <p align="center"><embed src="docs/healthy-diet-for-old-people.jpg"  ></p>
    </div>
    </form>
</body>

</html>
Code behind - Default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class TestEmbed : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        this.ctrl1.GraphicContent_Type = "PDF";
        this.ctrl1.FileFolderPath = "docs/";
        this.ctrl1.FileName = "DocumentSavedAs.pdf";
        //-this.ctrl1.FileName = "docs/healthy-diet-for-old-people.jpg";
    }
}

Add Feedback