.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

Dynamic Content In A ModalPopupExtender & Open A New Browser Window

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :ASP.Net
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>

View Complete Post

More Related Resource Links

Links to open new browser window?

I've setup some links on "My Site" and can't seem to figure out how to get them to open the links in a new window. I'd also like to do this for my RSS feed links.(This is in MOSS 2007) Can someone help?

How to open new browser window in asp.net mvc

I need open new browser window.

Open browser window + populate from code behind

Hi,I have a variable, which contains a whole web page. Is there a way to open a new browser window and set the contents of this variable as the page? I don't mind if it's javascript, but it has to be able to hold a bit of data if this is the case.Thanks!

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 { } }  

How to open MS word document in browser window?

Hi all

Is it somehow acheivable to open a .doc - document in a browser window?

If I link a .pdf - file from the document library in left navigation menu it opens in a browser window. If I do the same with a MS Word docuemnt it opens the Word application, but I want it to open it inside a browser. Can this somehow be done?


How to close individually the multiple open browser window using c# code?


Hello guys,

The scenario is I have multiple open browser window (IE or Firefox) then I want to close the specific browser individually.

I have tried to lookup the applications running from the task manager but I can't get the running application from the task manager > application > task.

I have added two references below to lookup the task running applications.

using System.Diagnostics;
using System.Threading;

Anyone can help me on how to close individually the specific open browser window using c# code event.


ModalpopupExtender to display dynamic content from database and content from form's control


Dear All,


I have a grid, in that i have edit button column, If user wants to click on the edit button I need to open a modal window to display the records for the particular row data from database.


And also I am using SMS form to send sms, If user click on the send button I need to open the modal window and to dislpay a preview of the sms from the textbox of the same form.


Please help me to achieve these two functionality.


Thanks in advance.




Arun Kumar

window.open call does not work in Dynamic Data Website


I have a Dynamic Data .net 3.5 website.  I am trying to have a popup display from the code behind.  Below is the code.  The calling form has an update panel surrounding the content.  I get a 404 'resource cannot be found' when it runs.  I have tried OpenNewWindow("ConfirmExam.aspx"); and OpenNewWindow("~Exams/ConfirmExam.aspx");.  The ConfirmExam.aspx and the calling page are in the same folder called Exams.  The calling page is a custom page iin /Custom Pages/Exams/Insert.aspx.  The ConfirrmExam.aspx page has yes and no buttons.  It executes code to go to a page based on the response.  I am open to suggestions.

//this is the method call

//this is the method definition
public void OpenNewWindow(string url)
               ScriptManager.RegisterStartupScript(this.UpdatePanel1, typeof(string), "newWindow", String.Format("<script>window.open('{0}');</script>", url), false);


Adding dynamic watermark to SharePoint 2010 document when open? (on browser view)


hi all,

In Sharepoint 2010, how to adding dynamic watermark to word 2010 when opening?

I thinking,

may be just need configure in sharepoint 2010?

or need sharepoint develop?


What you guys think? Any thoughts are welcome!

Thank you!


Window.open is not working in safari browser



          I m working popup window , its working well in IE and Firefox. But it is not working well in safari browser. Please see my code snippet below,

<script language="javascript" type="text/javascript">
    function CallPrint1(url) {
        var popup = window.open('', 'popup', 'toolbar=no,menubar=no,height=490px,scrollbars=yes,resizable=yes');
        return false;

 And in safari browser settings "Block pop-up windows" -

 if disable "Block pop-up windows" in safari browser,  popup is working well ,

 if i enable "Block pop-up windows" in safari browser, popup is not working well in safari browser

i wants to display popup in enable &a

Open PopUp Window From Error httpModule


I would like to open a popup window from the assembly to present the information to the user. Does anyone know if this is possible, I am presently doing the following:

        WriteLine("body {font-family:""Verdana"";font-weight:normal;font-size: .7em;color:black; background-color:white;}")
        WriteLine("b {font-family:""Verdana"";font-weight:bold;color:black;margin-top: -5px}")
        WriteLine("H1 { font-family:""Verdana"";font-weight:normal;font-size:18pt;color:red }")
        WriteLine("H2 { font-family:""Verdana"";font-weight:normal;font-size:14pt;color:maroon }")
        WriteLine("pre {font-family:""Lucida Console"";font-size: .9em}")

Browser detection and content adaptation


hi everyone

 Here i'm creating two sites for internet version and mobile version.

 When the user enters site name, we would detect the mobile browser automatically and redirect the user to mobile version of the site .

is it possible??

if yes, please tell the way i need to develop the application for mobile web application

SharePoint and Open XML: Generating Documents from SharePoint Using Open XML Content Controls


This article describes how to generate documents that contain data stored in SharePoint lists. The example demonstrates how OpenXML content controls can be defined to capture list data in a Word document and how LINQ to XML can be used to query the lists. The documents are generated from a SharePoint Web Part.

Eric White

MSDN Magazine October 2009

Cutting Edge: Managing Dynamic Content Delivery In Silverlight, Part 2


This month Dino continues his look at managing dynamic Silverlight content by discussing caching and isolated storage.

Dino Esposito

MSDN Magazine February 2009

Cutting Edge: Managing Dynamic Content Delivery In Silverlight, Part 1


This month Dino tackles the problem of large download size for Silverlight applications, explaining when to use streaming, when to divide the download, and other techniques for better performance over the wire.

Dino Esposito

MSDN Magazine January 2009

Browser window is opening up on the second click with javascript code



I am trying to set a javascript code to open up a new browser window with this URL that exists like shown below.

On the first click nothing happens but on the second click the browser window is opening up.


How is it possible to make it open up on the first click ?

                                <asp:ImageButton ID="ImageButton3" runat="server" Height="84px" 
                                    ImageUrl="~/images/1.jpg" Width="165px" 
                                    onclick="ImageButton3_Click" />

    protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
        String openURL = "javascript:window.open('" + "Folder1/testing.aspx" + "');return false;";
        ImageButton3.OnClientClick = openURL;


MOSS Content Database has more documents than what's seen on browser

I am not sure how sharepoint internally handles stuff, but this is what I see. I am a SQLDBA and one of my company sharepoint group re-organized a site, by moving some files from a document library to another document library. I think she used the content deployment.

When she see the number of documents in the document library it showed 700 documents. She moved only 50 of them. I went into the database and queried the Docs and DocStreams View and I get the list of all the those documents. I see both the ones that we see on the site as well as something that we do not see on the site.


ad.DirName, ad.LeafName, TimeCreated, ads.size/1024 as [Size(KB)], SetupPath

FROM Docs ad, DocStr

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