hi...i'm pasting my code here...but when the mail pop-up opens and if i enter the mail id then the file should open in the same page....I've pasted the code and can u give the suggestion please....

protected void Page_Load(object sender, EventArgs e) 

{

if (Page.IsPostBack == false)

{

if (Session["sess"] == null)

{

string testScript = "window.open('Default2.aspx','win','width=500,height=200,scrollbars= yes')";

string scriptID = "popup";

string myScript = buildScript(scriptID, testScript);if (!Page.IsStartupScriptRegistered(scriptID))

{

Page.RegisterStartupScript(scriptID, myScript);

}

//if (popupWindow && !popupWindow.closed)

// popupWindow.focus();

}

}

 

 

}

 

string buildScript(string id, string output_page)

{

string myScript = "\n";

myScript += "<script language='javascript' id='" + id + "'>\n";

//myScript += "window.open('" + output_page + "');\n";

myScript += output_page + ";\n";

myScript += "</" + "script>\n";

return myScript;

}

 

protected void lbcasestudy_Click(object sender, EventArgs e)

{

 

if (Session != null)

{

string script = "window.open('Pdf/Alpha Foundation.Pdf','new_Win')";ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", script, true);

}

 

}

protected void lbcasestudy1_Click(object sender, EventArgs e)

{

if (Session != null)

{

string script = "window.open('Pdf1/sql server 2000.pdf','new_Win');";ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", script, true);

}

}

}

**************************************************************************************************************************************************************************************

This is redirected to another page called default2.aspx and the code in this page is

 

public partial class Default2 : System.Web.UI.Page

{

//string reportfilename;

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

 

}

}

string buildScript(string id, string output_page)

{

string myScript = "\n";

myScript += "<script language='javascript' id='" + id + "'>\n";

//myScript += "window.open('" + output_page + "');\n";

myScript += output_page + ";\n";

myScript += "</" + "script>\n";

return myScript;

}

public void mailcheck()

{

//TextBox.txtmail ;

//if (!mailcheck(form1.txtmail.text))

//{

// form1.txtmail.text = "";

// form1.txtmail.focus();

// //return false;

//}

}

protected void btnsubmit_Click(object sender, EventArgs e)

{

string testScript = "window.close();";

string scriptID = "";

string myScript = buildScript(scriptID, testScript);if (!Page.IsStartupScriptRegistered(scriptID))

{

Page.RegisterStartupScript(scriptID, myScript);

}

//string script = "window.open('Pdf/','new_Win');";

//ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", script, true);

 

 

}

}

0
pvpradeepraghav
3/1/2008 12:19:39 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
664 Views

Similar Articles

[PageSpeed] 44

Hi pvpradeepraghav, 

Since further discussing has been posted to the other thread of this topic, please focus in that thread:
http://forums.asp.net/p/1227366/2212976.aspx#2212976


Zhao Ji Ma
Sincerely,
Microsoft Online Community Support

“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
0
Zhao
3/5/2008 8:20:11 AM
Reply:

Similar Artilces:

System.Net.Mail is giving error CS0029: Cannot implicitly convert type 'string' to 'System.Net.Mail.MailAddress'
I'm getting an error while trying to use the wizard to create a form and than pass it the vaibles to Mail. Any help would be much appreciated. SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage(); try {   message.From = txtEmail.Text; message.To.Add("admin1@yoursite.com"); message.Subject = "Feedback"; message.CC.Add("admin1@yoursite.com"); message.CC.Add("admin2@yoursite.com"); message.IsBodyHtml = false; message.Body = txtMessage.Text; smtpClient.Send(message); lblStatus.Text = "Email successfully sent."; } catch (Exception ex) { lbl...

Bugizilla 4.4.8 : There was an error sending mail from 'bugzilla-daemon@xxx.xxx.x.xxx' to 'mail-id@domain': Couldn't authenticate 'mail-id@gmail.com:...'
Dear All, I had configured Bugizilla 4.4.8 almost 8 months back for our internal purpose and was working fine all these days. Today morning it started giving the following error when I try to login as administrator. -----ERROR----------------------------------------------- An unexpected error occurred. This could be a temporary problem, or some code is behaving incorrectly. If this problem persists, please email this page to mail-d@domain with details of what you were doing at the time this message appeared. URL: http://192.168.0.138/complaints/index.cgi There was an error ...

Bug 976449
> The crash this time was > ____________________________________ > 0x00007fffef5571c5 in mozilla::dom::EncodingUtils::DecoderForEncoding ( > aEncoding=...) > at /home/dme/comm-central/mozilla/dom/encoding/EncodingUtils.cpp:75 > 75 MOZ_ASSERT(decoder, "Tried to create decoder for unknown encoding."); > #0 0x00007fffef5571c5 in mozilla::dom::EncodingUtils::DecoderForEncoding ( > aEncoding=...) > at /home/dme/comm-central/mozilla/dom/encoding/EncodingUtils.cpp:75 > #1 0x00007fffef3cc270 in nsHtml5StreamParser::SetupDe...

when I right click an E-Mail to send it to junk, you open it... don't do that!! If I wanted the mail opened I wouldn't bother to be marking it as Junk!!
Name: David Daniels Email: danielddatpaulbunyandotnet Product: Thunderbird Summary: when I right click an E-Mail to send it to junk, you open it... don't do that!! If I wanted the mail opened I wouldn't bother to be marking it as Junk!! Comments: When I mark my E-mail as junk I right click it, don't open the mail when I right click it, only when I left click it. If I right click the mail stay on the previous available e-mail and allow me to mark the right clicked e-mail as junk so it will be sent unread to the junk folder...thank you for your time. Browser...

Value of type 'System.Net.Mail.MailMessage' cannot be converted to 'System.Net.Mail.AlternateView'
Trying to create an alternateview to send a txt email with the html formatted email.  I've used string builder to create the whole email, but I get this error.  Any ideas why?  i've bolded the line that throws the error... Dim EmailBodyTxt As New StringBuilder EmailBodyTxt.Append("<html><style type='text/css'>.table{border:solid; border-color:#006666; width:600;} ")EmailBodyTxt.Append("<body><table class='table'><tr><td colspan='2'><h1>Test<br />RESPONSE SYSTEM</h1></td>...

I'm Not Sure I'm Getting All My G-Mail (Please Answer)
Name: Michelle McClintock Email: bitusboxatgmaildotcom Product: Thunderbird Summary: I'm Not Sure I'm Getting All My G-Mail (Please Answer) Comments: I've been using Thunderbird for some of my Earthlink mail and my G-Mail. Is there a limit on how much from each mail program the Thunderbird box will take? I'm not sure that I've been getting all my G-Mail in the last couple days into the Thunderbird box. What can I do to make sure I don't miss anything? Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.1.19) Gecko/20081212 Cam...

[ID 20020306.016] win NT: when close '<&='-d file handle the original one remains open, pecularities of open FH, '-'
This is a bug report for perl from "Anton Tagunov" <tagunov@motor.ru>, generated with the help of perlbug 1.33 running under perl v5.7.3. ----------------------------------------------------------------- Hello! 1) Both of the following examples print their source :-( use strict; use warnings; open FH, $0 || die "$!"; open GH, "<&=FH"; close GH; while(<FH>){print} use strict; use warnings; open FH, $0 || die "$!"; open GH, "<&=FH"; close FH; while(<GH>){print} That is <&= behaves ...

"Open or save file dialog" not opening on IE registering a javascript block in my page's code behind
Hi,I have a problem with a piece of code that appears to work on some systems but fails on others.I have a button in my ASP.NET 2.0 page that downloads a file from a SQL database to a temporary folder in my web server. After that it registers a javascript block to open the file on the calling client. The aim is to present  the “open or save” dialog for the downloaded file (an excerpt of the function is at the bottom of this message). This perfectly works on my debug machine (XP SP3, IIS 5.1, IE7) and on several others but fails (does nothing) on some more machines. For example I have th...

superreview granted: [Bug 363654] .url files opened via File:Open don't open/don't open properly on the 1.8.0 branch : [Attachment 248458] disables .url in file:open
Stuart Morgan <stuart.morgan@alumni.case.edu> has granted Smokey Ardisson (unreliable; no bugmail) <alqahira@ardisson.org>'s request for superreview: Bug 363654: .url files opened via File:Open don't open/don't open properly on the 1.8.0 branch https://bugzilla.mozilla.org/show_bug.cgi?id=363654 Attachment 248458: disables .url in file:open https://bugzilla.mozilla.org/attachment.cgi?id=248458&action=edit ------- Additional Comments from Stuart Morgan <stuart.morgan@alumni.case.edu> Well, that kinda sucks. ...

superreview requested: [Bug 363654] .url files opened via File:Open don't open/don't open properly on the 1.8.0 branch : [Attachment 248458] disables .url in file:open
Smokey Ardisson (unreliable; no bugmail) <alqahira@ardisson.org> has asked Stuart Morgan <stuart.morgan@alumni.case.edu> for superreview: Bug 363654: .url files opened via File:Open don't open/don't open properly on the 1.8.0 branch https://bugzilla.mozilla.org/show_bug.cgi?id=363654 Attachment 248458: disables .url in file:open https://bugzilla.mozilla.org/attachment.cgi?id=248458&action=edit ------- Additional Comments from Smokey Ardisson (unreliable; no bugmail) <alqahira@ardisson.org> Asking for sr on this 7-char patch in case we need to take it ...

[ID 20010629.002] perl segfaults unpredictable with valid code (Cookbook:p570,571 cmd3sel) concerns presumably a race condition between 'waitpid' and 'open' and signalhandling
Hi there! We have here a rather nasty problem which we could reproduce with different perl-versions(5.6.1 and 5.00503) and on different unix-like and unix operating systems (HP-UX 11, Solaris 2.6 (worst), SunOS 4.1.3 and Linux with Kernel 2.2.14). We are developing some software for use as administration tools for huge unix networks, so we have a big interest in our programs to run stable and predictable (the faintest buglet may end in up in expensive havoc). We want to create a routine that is able to handle external commands in a safe way and we want to communicate with it....

Get Mail doesn't open mail
FF 3. Downloaded the compatible "Get Mail" ext., but it doesn't open TB as it did in FF2. Checked for preferences, but there are none. Suggestions? Thanks. Stephen Fox wrote: > FF 3. Downloaded the compatible "Get Mail" ext., but it doesn't open TB > as it did in FF2. Checked for preferences, but there are none. > Suggestions? > > Thanks. Make sure that FF3 is your default browser, and that Thunderbird is the default mail program. -- Ron Hunter rphunter@charter.net Stephen Fox wrote: > FF 3. Downloaded the comp...

'Codebehind' attribute in the @ Page directive is not supported. Convert this page to the new code-behind model by opening the Web site (project) containing the page.
I have some code in ASP.net 1.1 and I would like to know what changes I must do to update the code to ASP.Net 2 beta. I am using Visual Studio Developer express 2005. I obtain the folowing errors:1* 'Codebehind' attribute in the @ Page directive is not supported. Convert this page to the new code-behind model by opening the Web site (project) containing the page.2* Could not load type 'JokePoint.Header'. C:\MyCommerceSite\JokePoint\UserControls\Header.ascx3*The server tag is not well formed. C:\MyCommerceSite\JokePoint\UserControls\DepartmentsList.ascxAnything?Thanks. CodeBe...

I'm getting a 'Login failed...' error when trying to open my database from my default.aspx.vb file..
Good morning, When I start my browser and try to open my (SQL Server 2000) database, using the 'Integrated Windows Authentication' method, I get the following error msg: [SqlException: Login failed for user 'MYDOMAIN\ASPNET'.]. Where DOMAIN = MYDOMAIN and USER = ASPNET I have made this user known to the SQL Server 2000... I opened my browser and executed the following function, which is in my default.aspx.vb file: Public Function checkuser(ByVal userName As String, ByVal password As String) As Boolean Dim strConnection As String = _ "Data Source=local...

Web resources about - hi...i'm pasting my code here...but when the mail pop-up opens and if i enter the mail id then the file should open in the same page....I've pasted the code and can u give the suggestion please.... - asp.net.getting-started

Suggestion - Wikipedia, the free encyclopedia
Suggestion is the psychological process by which one person guides the thoughts, feelings, or behaviour of another. Nineteenth century writers ...

Facebook Provides Advice For Those Users Who See Deceased Friend Suggestions
Over the past couple days a relatively substantial number of users have been complaining about Facebook’s upgraded suggestions feature for occasionally ...

What's your suggestion for an awesomely... - The Dish - Andrew Sullivan - Facebook
What's your suggestion for an awesomely bad Super PAC name?

Facebook’s Instant Personalization Improves Suggestions on Clicker Online TV Recommendations
... personalization for online television recommendations engine Clicker. When you visit the site while logged in to Facebook, you'll see suggestions ...

New tailored suggestions for you to follow on Twitter
... the first time, we want that process to be easy and fast. Currently, when new users come to Twitter, we show them all almost the same suggestions ...

Couple of suggestions for Fargo bloggers re Disqus comments.
Regarding Disqus comments: You can turn off the links to articles, if you don't care about revenue. Here's how: Go to the Disqus dashboard ...

New on Quora: Suggestions for Ask to Answer and... - Joel's Posts - Quora
One of the great parts of Quora is having a question answered by the perfect person, like a former Navy pilot who can explain what it's like ...

Chideo = The Charity Network - Exclusive Celebrity Videos from Fan Suggestions on the App Store on iTunes ...
Get Chideo = The Charity Network - Exclusive Celebrity Videos from Fan Suggestions on the App Store. See screenshots and ratings, and read customer ...

Suggestion for Feedhose - Flickr - Photo Sharing!
First thing I did when I saw Dave's Feedhose was narrow its browser window and drag it to the side of my screen. Which naturally led to visions ...

Suggestion Box: The Roots' Harry Potter Rap - YouTube
In honor of the show's trip to Universal Orlando, Tarik and The Roots perform a Harry Potter-themed rap. Subscribe NOW to The Tonight Show Starring ...

Resources last updated: 1/6/2016 9:46:46 AM