.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to add content to a new opened window

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net

Hi all,

i was working on a asp.net webpage and forms. this page contain a form, when user click submit, it will send a email to me. i use javascript to open a new blank window after clicking submit button: 

btnSubmit.Attributes.Add("onclick", "javascript:window.open(''); return false;");

now i want to add email content (some html code) into this new window, so it will display whats in the email to the user.

i have no idea how and where to add these codes. in the .ascx, or code behind file(ascx.cs) or i should make a new .js file?


View Complete Post

More Related Resource Links

Dynamic Content In A ModalPopupExtender & Open A New Browser Window

Ok, after searching on how to do this and trying many different ways and failing, I finally got something working.  So, I decided to post it here to help anyone else that might be trying to do the same thing.  If anyone sees a better way to do this then please let me know. I want to populate an update panel with addresses so I use a repeater.  I want the user to click a link and that causes a modal popup to appear for the user to enter thier address so that they can get driving directions to the address listed in the Repeater.  I needed a way to get the address the user was driving to, to also be inside the modal popup because I need to pass it along later.  The reason the list of addresses are in an updatepanel are for paging purposes.  I've used a simple version of the repeater in this example though.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML> <body> <form id="Form1" method="post" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <asp:UpdatePanel ID="myMainPanel" runat="server" EnableViewState=false> <ContentTemplate> <asp:Repeater ID="rptItems" runat="server" EnableViewState=false> <ItemTemplate>

How to sync main thread and new opened window

Hi all, I need to halt the main thread until some workflow is completed on the opened Window, the opened window has a user control content in which the user enter some data and click the button "next" . how can i halt the main thread and signal it to continue after the next button has been clicked? I've tryed using AutoRestEvent but the main thread get stucked and the window is frozen. ShowDialog wont help me, because i want to keep the window visible after the next button is clicked.     public void SomeMethod() { AppWizardStep2 step2 = new AppWizardStep2(ref myParams); Window myWin = new Window(); myWin.Content = step2; myWin.Show(); //Halt here // ...some logic that needs to continue after user workflow is completed on step2 user control }      

Help with Response.Content open in new window?

Hey guys, I have a button that when clicked on it will open a pdf file in the current window. Can someone help me modify my code to open in a new window? Here's what I have so far that works when the button is clicked:if (pdf != null) { Response.Expires = 0; Response.Buffer = true; Response.Clear(); Response.ClearHeaders(); Response.ClearContent(); Response.ContentType = "application/pdf"; //stream it back in the HTTP response Response.BinaryWrite(pdf); Response.Flush(); try { Response.End(); } catch { } }  

Problems with Master Page and content window

I have a master page whose primary function is to allow a user to search for a Credit Union.  They can either search by ID # or search by name.  With processing this page it will set session variables which in turn I would hope would be passed along to the content window. Within the content window I am displaying the information that will be needed on that particutlar page, if no record is found then it will allow them to add.  I also need it to clear the fields in the content window if they go from one record with data to one without.  Now if a user types in the ID#, then it doesn't seem to have any problems populating the content window.  The problem comes when they try and search by name.  If more then one record is returned then it will populate a listbox.  Which then I would like a user to select the name they are searching for and then populate the search boxes as well as process the content window. The problem I seem to be facing is the Page Load on the content window.  Session variables don't seem to be set in time for the content window to have the variable available to it. Hopefully you can help me out.Masterpage.master.vb Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'ResetValues() Me._txtCUName.Attributes.Add("onchange", "if(document

How to avoid page content wrapping when resize the window


How to avoid page content wrapping when resize the window?

i mean when user resize his browser window then the page content

should not be wrap, instead of scroll should appear,

so how can i do that?

i want to disable the entire parent window when the child window is opened?



 i am using the master page from the master page i am opening the child window.so, when ever i opened the child window i want to disable the entire parent window(all the controls present in the parent page) .how can we do it.


Burepalli V S Rao.

Part of Window content not minimizing with rest of Main Window.


I am developing an IDE-like WPF application.  The application's main window from the Microsoft  has a number of child tool windows and tabbed document windows. 

The layout system for the main window's child controls has been implemented using the Composite Application Library.

Recently, a problem arose in which two particular elements of the main application window did not minimize with the rest of the window.  Instead, these two child elements stay up on the screen.  However, I cannot actually click on the unminimized region.  In fact, I can drag items from desktop through the unminimized regions.  The only thing that I can think of that may be causing this is that the content that doesn't minimize is executing within a separate AppDomain.  The two UIElements from the different AppDomain are remoted from an Add-In (System.AddIn).

Has anyone else experienced a similar windowing problem?

New window with width and height identitical to the page content


hi all forum

I have my NewsDetails.aspx page which displays a certain news  in a gridview according to the NewsId query string field. i wish to make the user able to print the page or mail it to a friend  so I used the following code

protected void ArticleGrid_RowCommand(object sender, GridViewCommandEventArgs e)
        if (e.CommandName == "print")
            int NewsId = int.Parse(e.CommandArgument.ToString());
            string url = "ForPrint.aspx?NewsId=" + NewsId;
            string js = "<script language='JavaScript'>window.open('" + url + "','" + ArticleLbl.Text + "',";
            js += "'top=0,left=0,status=no,width=710,height=700,resizable=no,scrollbars= yes');";
            js += "</script>";
            ClientScript.RegisterClientScriptBlock(this.GetType(), &

Posting content to browsers new window


Hi friends,
I have developed an application which fetches the data from RSS and after modifying it I want to post it to the web browser (not we control but internet explorer or firefox). I am trying using HTT PResponse's Response.Write. But hadn't got any success can anyone please help me. If possible please let me know if I will write it like this can I maintain session information in future if required.

Require a Window whose content will resize as the winow is resized


Respected Sir/Mam

I want to code for a window whose content must automatically fit into the window as the window is resized by the user

For Example:Gmail Window all contents are perfectly resized when you resize the window

Thanking You

Salim Shaikh

SharePoint Tutorial - Content Types

SharePoint content types provide users with a way to manage and organize content in a more meaningful way. It's a reusable of settings you want to apply to a particular type of document in a library or item in a list.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Some areas of the site usually contain less-dynamic information. Internal memos and corporate policies are common examples of this information. One option for this information is to post these documents in a document library. Documents in a library are often stored in a few different formats: Word, Acrobat (PDF), or HTML. Each of these formats has its drawbacks.

Application Vs. Content Pages in SharePoint

SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page. The other type of ASPX page is a content page, also known as a site page. Each of these page types is stored in a different location in SharePoint. When developers create custom ASPX pages, they must decide on the page type.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Content Types in MOSS 2007

In this article I will try to describe the one of the best feature in Microsoft office Share Point 2007 called Content Types.

Content types are simply collection of contents.Each content in a Content type can have different settings.Basically it is a reusable collection of settings which you want to apply to a particular category of contents.

Content Query Web Part missing in SharePoint 2010

If you don't see content query web part listed in the web parts list, this is because you have not enabled "Search Server Web Parts" feature in site collection features. Enable this feature and content query web part will show in the list of web parts.

Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend