|
Hi Everyone
I'm writing a web application which has a button(call it "go"), after pressing this button, it has to do some calculations which take some time to be complete, so I want the application to play a "please wait" flash(call it "flash") while it executes, but the flash.play=true; code doesn't help me, the flash starts executing after the application has finished executing, so I tried to do the processing in another thread so that the page will be completed & will be sent to the user, now the "flash" plays properly, but I have another problem, after the execution has been done, I want the user to be redirected to another page, like newpage.aspx, but Response.Redirect("newpage.aspx") generates an error calling "the response is not available in this context." Please help me, what should I do?
|
|
|
|
|
semiramisContraA wrote: so I tried to do the processing in another thread
This may be the cause
Use
System.Web.HttpContext.Current.Response
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
One way is to use Ajax.
but if you need the functionality in only this page then no need of Ajax.
Do it at client side instead of server
When user click go button show image in the div tag using javascript.
And at the back you can have the same functionality that yo are doing.
I think this easy to impliment also
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Thank you for your answer, but will you please explain more?
|
|
|
|
|
i want to convert the any video file into .flv format.. it is worked local server perfectly.. but it is not worked in web server... security exception will be displayed.. i used ffmpeg.exe tool only... pls help me
Process ffmpeg; // creating process
string video;
string mpg;
video = Page.MapPath("movie.wmv");
mpg = Page.MapPath("") + "\\video.flv"; // thumb name with path !
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = "-i " + video + " -f flv -vcodec flv -qscale 10 -s 480x360 -ar 44100 -acodec libmp3lame " + mpg; // arguments !
ffmpeg.StartInfo.FileName = Page.MapPath("ffmpeg.exe");
ffmpeg.Start();
|
|
|
|
|
Is the tool you are using a third party tool?
What is the exact error messagr you are recieving?
|
|
|
|
|
i receive this error
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request failed.
Source Error:
[No relevant source lines]
Source File: App_Web_1lwzeoop.0.cs Line: 0
Stack Trace:
[SecurityException: Request failed.]
_Default.Button1_Click(Object sender, EventArgs e) +0
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_1lwzeoop.0.cs
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
|
|
|
|
|
Please Describle me what is Assembly and what is it's use.
How to create assembly.
How it's useful for security deployment.
Thanks
|
|
|
|
|
Member 4542257 wrote: Describle me what is Assembly and what is it's use.
Assembly in .net 2.0[^]
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
DLL file is referred to as an assembly.
An assembly is the set of files that comprise an entire .NET application and, in the typical ASP.NET application example, can consist of one single file, or, in more complex situations, can consist of a number of files.
MSIL Code - MSIL, or Microsoft Intermediate Language, is the intermediate language all .NET applications are compiled down to. That is, when a .NET application is compiled, the high-level code you wrote code in C# or Visual Basic .NET is compiled into the intermediate language MSIL. This MSIL is executed by the Common Language Runtime (CLR) when the program is executed.
Metadata - in addition to the actual application's source code (MSIL), the assembly also contains extra bits of information about versioning, security, deployment, and so on.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
You are copying copyrighted data from other websites and pasting it here. It's not good. You should put a reference to the website from where you copied the text. Your message is copied from here[^]
|
|
|
|
|
Pls Help
How to correct error while assembly is missplace.
|
|
|
|
|
Rephrase your question so it makes some sense
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Pls Help
How to Change Form Size according to System Resolution.
|
|
|
|
|
Get it
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Member 4542257 wrote: How to Change Form Size according to System Resolution.
It's tough to resize your page according to the screen size. You can use "%" for supplying width, so your page gets aligned to the current resolution.
|
|
|
|
|
|
Here i have a problem with browsers back(>) and forward(<) buttons.
When i login into my application from login page,i navigate through my Menu.
If i click on browser's back button ,it will navigate till home page and forward the same where I am.
Actully i dont want the user to go to login page iff he click on logout.
In the webpage i have seperate back button for the last visited page,but if he click on browsers back button continuosly,it doesnt make any sense of login page.
Wat to do to rectify this?Where i have to redirect to only menu page for the browsers back buttons last hit.
Undersatand the problem and give me some solution.Please..if u r free.
kissy
|
|
|
|
|
Use Form Authentication.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Many of the user have the same Issue with there Browser Back and Forward button.
Issue here is not the browser but your implimentation. you need to take care of logout and login functionality
1. Clear out the DataContainer or session when user says Log Off.
2. you should check for user crendetial in every page Load
Like Session or DataContainer is having the values or not if no value redirect user to Login Page.(Better way is to write this functionality in base class load function instead of every Page).
3. Now even user says log out and Click back button browser will show the page from its Cache.it is not coming from server so even if he is able to see the Page if he clicks on any server side event he is going to Login page.
Please let me know if you have impplemented then also facing some different issue ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Like Session or DataContainer is having the values or not if no value redirect user to Login Page.(Better way is to write this functionality in base class load function instead of every Page).
Wats the better way,which one u consider as a base class?
My problem is,
After login,did some operations in some page and from that page if he clicks on back(browsers)button,it will go till homepage and with FORWARD button it is just allowing to do anything where i was doing something---which is wrong.
So this user credentials,am i need to check on each page??Ya how to redirect to login page as i am not emptying session values other than logout page?
kissy
|
|
|
|
|
You can't control it as user can click any thing in its browser.
If the user is Logged in User and he clicks back button can go to any last page visited.
The main thing is that if user logged out and then click back button and if comes to any last page visited then he should not be able to do anything.
If don't want to have back functionality just disable the cache of the browser then also i don't thing it will help you.
Logged in user can navigate the website using back button you can check this here in CP just click back back you can see your last page visited and do anything as you visited it first time
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Hi,
I would like to open a crystal report in a new window by passing two query strings. The code i am using as of now is as follows,
protected void btnShowReport_Click(object sender, EventArgs e)
{
..
..
..
..
Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format);
}
Could anyone help me on this above issue.
Many thanks in advance.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Hari_1010 wrote: Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format);
This won't open in a new window. Try the following one
string url = "ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format;
ClientScript.RegisterClientScriptBlock(this.GetType(),"NewWindow",
string.Format("window.open (\"{0}\",\"mywindow\")",url),true);
|
|
|
|
|
Hi Navaneeth,
Thanks a lot for your kindly help. It's working fine now.
Regards,
Hariharan C
|
|
|
|