Click here to Skip to main content
15,910,277 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How we can setting up a mail server Pin
Masood Kochi,SSF12-Jun-08 19:46
Masood Kochi,SSF12-Jun-08 19:46 
GeneralRe: How we can setting up a mail server Pin
eyeseetee12-Jun-08 21:35
eyeseetee12-Jun-08 21:35 
AnswerRe: How we can recieve mail in our web page? Pin
N a v a n e e t h12-Jun-08 20:01
N a v a n e e t h12-Jun-08 20:01 
QuestionShowing Image in image control from database Pin
sumit703412-Jun-08 19:20
sumit703412-Jun-08 19:20 
AnswerRe: Showing Image in image control from database Pin
Christian Graus12-Jun-08 19:34
protectorChristian Graus12-Jun-08 19:34 
GeneralRe: Showing Image in image control from database Pin
sumit703412-Jun-08 19:36
sumit703412-Jun-08 19:36 
QuestionSecurity when calling webservice from javascript Pin
Laddie12-Jun-08 19:14
Laddie12-Jun-08 19:14 
QuestionPop up print window on button click Pin
For_IT12-Jun-08 18:07
For_IT12-Jun-08 18:07 
Hi all
I am implementing print configuration functionality on button click:

I am using following code:
protected void lnkButton_Click(object sender, EventArgs e)
    {
  
        StringBuilder sb = new StringBuilder();
        sb.AppendLine(" var popup = window.open( '','popup','toolbar=no,menubar=no,scrollbars=1,width=750,height=800');");
        sb.AppendLine("popup.document.write('debugger');");
        sb.AppendLine("popup.document.write('<html><head>');");
        sb.AppendLine("popup.document.write('<title>Configurations for ACA</title>');");
        sb.AppendLine("popup.document.write('</head><body>');");
        sb.AppendLine("popup.document.write('<div id='lnk' class='noprint' style='text-align:right'>');");
        sb.AppendLine("popup.document.write('<a href='# onclick='window.print();return false;'>Print</a>');");
        sb.AppendLine("popup.document.write('<a href='#' onclick='window.close();return false;'>Close</a>');");
        sb.AppendLine("popup.document.write('</div>');");
        sb.AppendLine("popup.document.write('<table border=1px style=width:500px; margin-left:100px; margin-top:50px; border-color:Maroon; >');");
        sb.AppendLine("popup.document.write('<tr><td>');");
        sb.AppendLine("popup.document.write('This is my string');");
        sb.AppendLine("popup.document.write('</td><td>')");
        sb.AppendLine("popup.document.write('" + MyString + @"');");
        sb.AppendLine("popup.document.write('</td></tr></table>');");
        sb.AppendLine("popup.document.write('</body></html>');");

        Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", sb.ToString(), true);
    }


when I am executing this code, I am getting an exception on line

sb.AppendLine("popup.document.write('&lt;div id='lnk' class='noprint' style='text-align:right'&gt;');");


Can anyone please give me suggestion what is wrong?
Many thanks.
AnswerRe: Pop up print window on button click Pin
Christian Graus12-Jun-08 18:45
protectorChristian Graus12-Jun-08 18:45 
GeneralRe: Pop up print window on button click Pin
For_IT13-Jun-08 8:50
For_IT13-Jun-08 8:50 
QuestionRedirecting to a page outside Virtual directory Pin
M. J. Jaya Chitra12-Jun-08 18:02
M. J. Jaya Chitra12-Jun-08 18:02 
AnswerRe: Redirecting to a page outside Virtual directory Pin
eyeseetee12-Jun-08 21:38
eyeseetee12-Jun-08 21:38 
GeneralRe: Redirecting to a page outside Virtual directory Pin
M. J. Jaya Chitra12-Jun-08 21:44
M. J. Jaya Chitra12-Jun-08 21:44 
GeneralRe: Redirecting to a page outside Virtual directory Pin
eyeseetee12-Jun-08 22:24
eyeseetee12-Jun-08 22:24 
GeneralRe: Redirecting to a page outside Virtual directory Pin
M. J. Jaya Chitra12-Jun-08 22:44
M. J. Jaya Chitra12-Jun-08 22:44 
GeneralRe: Redirecting to a page outside Virtual directory Pin
eyeseetee12-Jun-08 23:11
eyeseetee12-Jun-08 23:11 
QuestionDetailsView -&gt; getting immediately into insert/edit mode when page loads Pin
Desmond Lim12-Jun-08 15:52
Desmond Lim12-Jun-08 15:52 
AnswerRe: DetailsView -&gt; getting immediately into insert/edit mode when page loads Pin
Venkatesh Mookkan12-Jun-08 17:51
Venkatesh Mookkan12-Jun-08 17:51 
AnswerRe: DetailsView -&gt; getting immediately into insert/edit mode when page loads Pin
Wasif Ehsan12-Jun-08 18:49
Wasif Ehsan12-Jun-08 18:49 
QuestionRe: DetailsView -&gt; getting immediately into insert/edit mode when page loads Pin
Desmond Lim15-Jun-08 17:12
Desmond Lim15-Jun-08 17:12 
QuestionAutoComplete Extender results in textbox have breaks between each item [modified] Pin
thedom212-Jun-08 12:09
thedom212-Jun-08 12:09 
Questionhow to disply next and Previous Recods in a Html table Pin
gikky12-Jun-08 11:08
gikky12-Jun-08 11:08 
AnswerRe: how to disply next and Previous Recods in a Html table Pin
Christian Graus12-Jun-08 16:49
protectorChristian Graus12-Jun-08 16:49 
QuestionConfigure site to NOT use NT login Pin
Dan Neely12-Jun-08 7:31
Dan Neely12-Jun-08 7:31 
AnswerRe: Configure site to NOT use NT login Pin
Dan Neely12-Jun-08 7:51
Dan Neely12-Jun-08 7:51 

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.