Skip to main content

Posts

Showing posts from June, 2012

Upload Images with text or image watermark using ASP.NET

<!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">     <table cellpadding="4" cellspacing="3">         <tr>             <td>                 Images:             </td>             <td>                 <asp:FileUpload ID="mainImg" runat="server" />             </td>             <td>                 &nbsp;             </td>         </tr>         <tr>             <td>                 Watermark - Text:             </td>             <td>                 <asp:TextBox ID="txtWater" runat="server"></asp:T

How to store and Retrieve pdf files in sqlserver 2008 using asp .net

Table CREATE TABLE [dbo].[PDFUPLOAD](     [ID] [int] IDENTITY(1,1) NOT NULL,     [PDFNAME] [varchar](50) NULL,     [PDFCONTENT] [varbinary](max) NULL ) ON [PRIMARY]   Follow the Code Which is Help How to Store /Retrieve pdf files in DataBase :   Write This code  in Default.aspx page: <% @ Page Language ="C#" AutoEventWireup ="true" CodeFile ="Default.aspx.cs" Inherits ="_Default" %> <! 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 id ="Head1" runat ="server">     < title ></ title > </ head > < body >    < form id ="form2" runat ="server">     < div >         < table cellpadding ="0" cellspacing ="0" align ="center" width ="600&qu

.NET Format String 102: DateTime Format String

"I see stuff like "zz" passed into DateTime.ToString(). What exactly does that do?" -- Very Confused DateTime String Formatter DateTime has its own set format string modifiers because there are so many ways to display a date and time. There are 2 things that affects how your DateTime is formatted. 1. CultureInfo Besides the format string modifiers, CultureInfo on your thread also greatly influences the output. My examples will be based on CultureInfo .InvariantCulture . You can set the CultureInfo on your thread by calling this Thread .CurrentThread.CurrentCulture = <some culture> ; eg. Thread .CurrentThread.CurrentCulture = CultureInfo .InvariantCulture; Thread .CurrentThread.CurrentCulture = new CultureInfo ( "en-US" ); Thread .CurrentThread.CurrentCulture = new CultureInfo ( "de-DE" ); 2. Format String There are actually two different ways of formatting a DateTime object. Both methods produce the same results: Date