Click here to Skip to main content
15,885,309 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Hide a row Pin
Kaushal Arora6-Jan-10 18:36
Kaushal Arora6-Jan-10 18:36 
GeneralRe: Hide a row Pin
MacIntyre6-Jan-10 20:33
MacIntyre6-Jan-10 20:33 
AnswerRe: Hide a row Pin
Jeneesh K. Velayudhan6-Jan-10 18:37
Jeneesh K. Velayudhan6-Jan-10 18:37 
GeneralRe: Hide a row Pin
MacIntyre6-Jan-10 20:44
MacIntyre6-Jan-10 20:44 
QuestionRetreive control with certain type (Related to Win form and ASP.net) Pin
wilsonmanmcp6-Jan-10 17:52
wilsonmanmcp6-Jan-10 17:52 
AnswerRe: Retreive control with certain type (Related to Win form and ASP.net) Pin
Jeneesh K. Velayudhan6-Jan-10 18:46
Jeneesh K. Velayudhan6-Jan-10 18:46 
GeneralRe: Retreive control with certain type (Related to Win form and ASP.net) Pin
wilsonmanmcp6-Jan-10 21:39
wilsonmanmcp6-Jan-10 21:39 
QuestionFormview to PDF Pin
RajpootRohan6-Jan-10 17:51
professionalRajpootRohan6-Jan-10 17:51 
Hi to all,

I am using formview control to generate invoice. Instead of printing html view , it is printing html code in PDF. I am doing like this:

public void generate()
{

    MemoryStream m = new MemoryStream();
    Document document = new Document(PageSize.A4, 10f, 10f, 10f, 0f);
    try
    {
        Response.ContentType = "application/pdf";

        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        FormView1.RenderControl(htw);
        string html = sw.ToString() ;


        StringBuilder str = new StringBuilder();
        str.Append("<h3><b>Online Application Form Details </b></h3>");
        str.Append(html);

        PdfWriter writer = PdfWriter.GetInstance(document, m);
        writer.CloseStream = false;
        document.Open();
        document.Add(new Paragraph(str.ToString()));

    }
    catch (DocumentException ex)
    {
        Console.Error.WriteLine(ex.StackTrace);
        Console.Error.WriteLine(ex.Message);
    }
    document.Close();

    Response.OutputStream.Write(m.GetBuffer(), 0, m.GetBuffer().Length);
    Response.OutputStream.Flush();
    Response.OutputStream.Close();
    string filename = "~/Invoices/sample.pdf";
    string path = Server.MapPath(filename);
    m.WriteTo(new FileStream(@path, FileMode.Create));
    m.Close();
}

public override void VerifyRenderingInServerForm(Control control)
{

}


please assist me.....

cheers,
sneha

QuestionOne or more data sources is missing credentials Pin
priyareguri6-Jan-10 17:40
priyareguri6-Jan-10 17:40 
Questiondelayed action and response.redirect in same moment Pin
laziale6-Jan-10 11:18
laziale6-Jan-10 11:18 
AnswerRe: delayed action and response.redirect in same moment Pin
m-khansari6-Jan-10 18:51
m-khansari6-Jan-10 18:51 
GeneralRe: delayed action and response.redirect in same moment Pin
laziale7-Jan-10 3:46
laziale7-Jan-10 3:46 
GeneralRe: delayed action and response.redirect in same moment Pin
m-khansari7-Jan-10 6:41
m-khansari7-Jan-10 6:41 
GeneralRe: delayed action and response.redirect in same moment Pin
laziale7-Jan-10 8:53
laziale7-Jan-10 8:53 
GeneralRe: delayed action and response.redirect in same moment Pin
m-khansari7-Jan-10 20:07
m-khansari7-Jan-10 20:07 
QuestionBrowser back button -&gt; force a logout Pin
gerrybrennan6-Jan-10 7:37
gerrybrennan6-Jan-10 7:37 
AnswerRe: Browser back button -&gt; force a logout Pin
Abhishek Sur6-Jan-10 11:11
professionalAbhishek Sur6-Jan-10 11:11 
AnswerRe: Browser back button -&gt; force a logout Pin
PunkIsNotDead6-Jan-10 12:05
PunkIsNotDead6-Jan-10 12:05 
Questionmasterpage -&gt; Check if javascipt is enabled & cookies enabled. Pin
gerrybrennan6-Jan-10 7:17
gerrybrennan6-Jan-10 7:17 
AnswerRe: masterpage -&gt; Check if javascipt is enabled & cookies enabled. Pin
Abhijit Jana6-Jan-10 7:32
professionalAbhijit Jana6-Jan-10 7:32 
QuestionRegistering global HttpModule Pin
Gennady Oster6-Jan-10 3:57
Gennady Oster6-Jan-10 3:57 
AnswerRe: Registering global HttpModule [modified] Pin
m-khansari6-Jan-10 19:14
m-khansari6-Jan-10 19:14 
GeneralRe: Registering global HttpModule Pin
Gennady Oster9-Jan-10 1:01
Gennady Oster9-Jan-10 1:01 
QuestionEnable asp menu with javascript Pin
dptalt6-Jan-10 2:47
dptalt6-Jan-10 2:47 
AnswerRe: Enable asp menu with javascript Pin
Kaushal Arora6-Jan-10 18:46
Kaushal Arora6-Jan-10 18:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.