|
But there is a difference between a Postback and a first call to a page.
And a refresh is the latter for me, though it's hard to say what a click on the browser refresh will do because it will send the last request again (postback or not).
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
A refresh will always refresh the last call made, otherwise how can it refresh page state. The way around this is to never show a postback, for a postback to redirect to the same page with URL parameters the restore state. Then a refresh will go to this page, and the page can be written so this performs no actions, it just shows the same state.
The other option is to have a button that links back to the page, which will not postback, but will lose any state derived from postbacks that have occurred.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
In the button click event of the Refresh button place the following code
protected void Button1_Click(object sender, EventArgs e)
{
Page.Response.Redirect(Page.Request.Url.ToString(), true);
}
Koushik
|
|
|
|
|
|
This is kind of useless. The page has already done a refresh, on the button, and it would just finish it's lifecycle without the redirect.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The page has done the refresh part but may be there are somethings to be done when Page.IsPostBack is false.
Koushik
|
|
|
|
|
hi all,,
i created .mdf file under my App_Data file if i am connecting to that data base..
i am getting the following error
"Failed to generate a user instance of SQL Server.
Only an integrated connection can generate a user instance.
The connection will be closed"
Can any body help me to fix this...........
|
|
|
|
|
hi!
asp.net Datagrid can display in row format?
Generally datagrid is displayed in column format
eg: A|B|C|D
but i want in A
--
B
--
C
it is very urgent,plz let me know the answer as soon as possible
thnx,
nimmi
|
|
|
|
|
Get it
Link1
Link2
Link3
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
Nirmala Jyothi wrote: it is very urgent
this won't really help you from getting fast answer. If you want fast answer, go and ask in some support forums.
Answer : Use a template column to get result like this.
|
|
|
|
|
Hello friends, I got this error in my application. What went wrong..and how to resolve it..I am using vs 2005..
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machinekey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machinekey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Source Error:
[No relevant source lines]
Source File: App_Web_adminlogin.aspx.4e1cade6.fhtclyxp.0.cs Line: 0
Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2549708
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +214
[ViewStateException: Invalid viewstate.
Client IP: 10.8.6.6
Port: 1268
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7
ViewState: /wEPDwULLTE1NjYxMDU5OTgPZBYCAgMPZBYCAg0PDxYCHgdWaXNpYmxlaGRkZO2e2+a2WhZCITPLB7L6SRRWmvRV
Referer: http://watergenie.ca/test/webmaster/adminlogin.aspx
Path: /test/webmaster/adminlogin.aspx]
[HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machinekey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +116
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +251
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.test_webmaster_adminlogin_aspx.ProcessRequest(HttpContext context) in App_Web_adminlogin.aspx.4e1cade6.fhtclyxp.0.cs
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
|
|
|
|
|
Obvious question: do you have a web farm?
If yes, do what exception message says. If not, it can be caused by someone (bot) acessing your site with cached (therefore probably invalid) viewstate.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hi all,
I have a dataset, i need to search for a string in the dataset. the dataset is not bound to any control. How can i do that? should i get any examples?
Thanking you in advance........
Sebastian
|
|
|
|
|
Hi Sebastian,
I think you can take each DataTable from DataSet and use DataTable.Select() command. This will return datarow collection.
Hope this helps
|
|
|
|
|
i have some numeric type value in the textbox.when i show the textbox value in the add watch , it shows the value in the double quotes.now the problem is how can i find out - if the textbox contains some numeric value - whether the textbox contans numeic value or not.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
On the client, or the server ? You can do it on the server using regex. I believe javascript also has regex support, but I'm not familiar with it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
presently i am debugging my program
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
try this
int numeicVal;
if(int.TryParse(value),out numeicVal)
{
}
else
{
}
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
ThanQ
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
can i display the message box in the function under a particular condition?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: can i display the message box in the function under a particular condition?
an alert box ? Try
Page.RegisterClientScript("name","JSFun");
|
|
|
|
|
hi,
you can use javascript functions to display the message box..
regards
|
|
|
|
|
Of course. If the condition is on the server, write the script to show the box only if the condition is met. Doing this all in javascript, should be self evident.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi There,
Can someone suggest me some good Rating Tool for .net 2.0
Is it possible to make one?
If there are already such Free Tool.
I found one here on our site, but its compatiable with .net 1.0 only.
Or last option if i have to buy then, can you please suggest me a good one?
Thanks
Cheers
Menon
|
|
|
|
|
mady1380 wrote: Can someone suggest me some good Rating Tool for .net 2.0
AJAX toolkit comes up with a good rating tool. Check that
|
|
|
|