.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

Locking Page with progress message on postback

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :ASP.Net
I have implemented a lockscreen based on the following articlehttp://www.4guysfromrolla.com/articles/121708-1.aspxIt does work for the most part but there are a couple of scenarios it causes issues and we ended up having to disable it.  Here is one example where it has issues.With a button on a page clicking the button calls the javascript to "lock" the screen with an overlay and show the progress message.In the button click I have the following code Response.ClearContent() Response.ContentType = "application/pdf" Response.AddHeader("content-disposition", "attachment;filename=TestFile.pdf") Response.WriteFile(Server.MapPath("TestFile.pdf")) Response.Write(Date.Now.ToLongDateString() & " " & Date.Now.ToLongTimeString()) Response.End() which will display the file download dialog box which is what I want.  What happens though is that my lock screen stays on in this scenario because with my button click code I'm overriding the response.  Is there an easy way around this?  The only way I have figured out is have my button click write out some javascript to open a new window that calls a .aspx page which has the button click code shown above in it to write out the file or have an invisible iframe on the page and load the .aspx with the button click code shown above.  Any other way ar

View Complete Post

More Related Resource Links

Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




page postback problem with crystal report


Hi , i am creating crystal report with asp.net it is working showing data but  data is of two page its is take round trip action but report is not show 
until again i click on show button in this it is not propersly showing that data is how.

<br />
    <asp:Button ID="btnShow" runat="server" OnClick="btnShow_Click" Text="Show Report" />
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" DisplayGroupTree="False" EnableDatabaseLogonPrompt="False" /> CrystalReportViewer1.ReportSource = null; SqlCommand cmd = new SqlCommand(strcmd, c.con); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); ReportDocument doc = new ReportDocument(); doc.Load(AppDomain.CurrentDomain.BaseDirectory + "\\rptQuotation.rpt"); doc.SetDataSource(ds.Tables[0]); // login info SqlConnectionStringBuilder csb = new SqlConnectionStringBuilder(ConfigurationManager.ConnectionStrings["conStr"].ConnectionString); TableLogOnInfos crtableLogoninfos = new TableLogOnInfos(); TableLogOnInfo crtableLogoninfo = new Tabl

Remeber page postion on postback



I dont know if this is possible or not...

I want the page when refreshed to remember the position that the user was at on the page, for instance if they are scrolled half way down the page when the page posts back can it return to that position on the page?



Change part of a page without full postback


I have a page with two columns. Initially, the left column will contain a list of links that are article titles. Clicking on one of the links will display the text of the article in the right column, keeping the list of titles in the left column. Clicking on another title will clear the text of the first article and display the second. Is there a way to accomplish this without having to repaint the whole page? I would rather not have the whole page resent each time a title is clicked, but rather have the page stay as is and only the contents of the right column get cleared and redisplayed. I assume there's a way to do this with JavaScript, but I don't know how and would appreciate some help. Thanks!

Is there a function in Jquery which run only one time no matter load page or PostBack

In asp.net, I can use Method A to run somethings A one time, and somethings A will nor run when page is postback but In JQuery, I hope to run something B one time when the page is loaded, but if I use Method B, the "Somethings B" always run even the page is pastBack, how can I do? Thanks! ------------------Method A------------protected void Page_Load(object sender, EventArgs e){    if (!IsPostBack)    {       //Do Somethings A    } }   ------------------Method B------------$(document).ready(function () {   //Do Somethings B})

"The file is not checked out" on page Postback

Hi there, I have a Publishing site with the Pages library set to "Require documents to be checked out".  As an administrator or member of the site, when i minimise/restore webparts on my page, then perform a postback operation (via some webpart on my page) i get an error saying:  The file is not checked out.  You must first check out this document before making changes. Its as if during the postback after minimising/restoring a webpart SharePoint wants to save that state! How do I stop this from happening?  Is there a personalization setting i am missing?   P.S. Here is a dummy postback operation if you'd like to test it, just paste it into a CEWP: <a id="Test" href="javascript:__doPostBack('Test','')">Test Postback</a>  

Refresh Label on web page without postback

Hi , In my web page i got a button and when this button is clicked it will display message on the label. Example : label text changed from "Start" to "Processing to "Completed". Therefore I want to refresh the label text on my web page so from user site they are able to see the text on Label is changing.. Thanks Linoo  

Refresh Label on web page without postback

Hi , In my web page i got a button and when this button is clicked it will display message on the label. Example : label text changed from "Start" to "Processing to "Completed". Therefore I want to refresh the label text on my web page so from user site they are able to see the text on Label is changing.. Thanks LeNoo

How to manage postback on crystal Report viewer next page click button clickj

 Hi,       I am using Crystal Report on my ASP.NET Fw. 3.5 project. My report contains 100+ pages. When I click on next page button on crystal report viewer control my whole page gets postback to server and then second page appears. This take same time when first time report gets loaded.     Any suggestion how to imporve user experience in thiss case?   Nilkanth Desai   

Client Javascript runs, but then page errors out when clicking on a control that uses postback

Using this script on a button click <script language="javascript"> function printdiv(printpage) { var headstr = "<html><head><title></title></head><body>"; var footstr = "</body>"; var newstr = document.all.item(printpage).innerHTML; var oldstr = document.body.innerHTML; document.body.innerHTML = headstr + newstr + footstr; window.print(); document.body.innerHTML = oldstr; return false; } </script> After it is done, I can't click on my calendar control.  I was hoping to add somethign that would force a refresh in the script, but nothing I do works. Any thoughts?  Thanks! 

How to Show Loading Message while delay in Page Opening

Hy My web application is make time to open First page due to various data control on the page and values are coming to that control from database so i want to show the loading message of gif image during page loading delay. I have written this code in my master page but that image is not showing the application so please give solution on that problem<html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server">   <title>Load Wait Message Demo</title> </head> <script type="text/javascript" language="javascript">   if(document.getElementById) { // IE 5 and up, FF     var upLevel = true;   } else if(document.layers) { // Netscape 4     var ns4 = true;   }   else if(document.all) { //IE 4      var ie4 = true;   }   function showObject(obj) {   if(ns4) {      obj.visibility = "show";   }   else if (ie4 || upLevel) {      drawMessageBox(); obj.style.visibility = "visible";            } }        showObject('splashScreen');   function hideObject(obj) {   if(ns4) {     

Null reference message Custom Error page

how come a Null session value that is called, doesn't get directed to the Custom Error Page?

How to implement a Postback Enabled aspx page in SharePoint 2007

Hi, I create a webpart with aspx page and in aspx page i used autopostback true in dropdown list control.but this is not work in sharepint site. please let me know how to work postback enabled and autopostback true aspx page in sharepoint server Thanks Sanjeev Tiwari  

Error: The replication agent has not logged a progress message in 10 minutes

Hello,      We are consistently getting the error message below on our subscribers that have blob images. Is there a way to increase a setting to avoid SQL to throw this error, or another suggestion? Thanks in advance.   John   Error messages: The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor are still active.   18 -BcpBatchSize 10000018 -ChangesPerHistory 10018 -DestThreads 218 -DownloadGenerationsPerBatch 518 -DownloadReadChangesPerBatch 10018 -DownloadWriteChangesPerBatch 10018 -FastRowCount 118 -HistoryVerboseLevel 318 -KeepAliveMessageInterval 30018 -LoginTimeout 1518 -MaxBcpThreads 218 -MaxDownloadChanges 018 -MaxUploadChanges 018 -MetadataRetentionCleanup 118 -NumDeadlockRetries 518 -PollingInterval 6018 -QueryTimeout 40018 -SrcThreads 218 -StartQueueTimeout 018 -UploadGenerationsPerBatch 318 -UploadReadChangesPerBatch 10018 -UploadWriteChangesPerBatch 10018 -Validate 018 -ValidateInterval 60   Due to the memory leak issue with respect to replicating blobbed images we have changed UploadGenerationsPerBatch to = 3.

Get Control that triggered cross page postback

Hi I want to know if there is a way to get the control that triggered the postback,such as I have one page Page1.aspx with two buttons like<asp:Button id="btnCrossPost" runat="server" Text="Post To Another Page" PostBackUrl="Page2.aspx" CommandArgument="1"/><asp:Button id="btnCrossPost2" runat="server" Text="Post To Another Page 2" PostBackUrl="Page2.aspx" CommandArgument="2"/>and in Page2.aspx I want to get which button triggered the post back so that I can get the command argument which is vitalto the processing of the next page.Thanks.

Page title with Register symbol change in Master page on postback


I have a below Page title in my master page

<title>My Test Application Name&reg;</title>

It renders Fine with Register symbol after the text "My Test Application Name" on start of the page but on any postback the title turn into My Test Application Name&reg;

Kindly let me know what can i do with minimal effort to fix this issue

Progress Bar When page is loading


Dear Fren's

I have a new issue regarding the progressbar 

I have a page from which i am passing a parameter to CrystalReportviewer on the next page

and a converting a Crystal report in to PDF .

My problem is i want to show a progress bar while the page is loading (on which crystal Report Viewer is Placed) and writing a PDF file

I have already place a scriptmanager Updatepanel and updateprogresbar on that page but the still the page is showing blank while loading the page


please help   

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