|
ASP.NET is a framework which generates HTML on the server. Javascript is the language that runs in your browser, and the language in which ASP.NET generates code to do anything that runs on the client ( such as validation ). Buy a javascript book and work through it, or look up some tutorials on the web.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
i have this error.
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +195
System.Web.UI.LosFormatter.Deserialize(String input) +60
[HttpException (0x80004005): Authentication of viewstate failed. 1) If this is a cluster, edit <machinekey> configuration so all servers use the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. 2) Viewstate can only be posted back to the same page. 3) The viewstate for this page might be corrupted.]
System.Web.UI.LosFormatter.Deserialize(String input) +116
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +101
[HttpException (0x80004005): Invalid_Viewstate
Client IP: 10.1.1.1
Port: 7332
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.3705; FDM; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
ViewState: dDwtMTUwNTkzNDU1NDt0PDtsPGk8MT47PjtsPHQ8O2w8aTwxPjtpPDM+Oz47bDx0PDtsPGk8MTM+Oz47bDx0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+Oz4+O3Q8O2w8aTwxPjtpPDM+O2k8NT47aTw3PjtpPDk+O2k8MTE+O2k8MTM+O2k8MTU+O2k8MTc+O2k8MTk+O2k8MjE+Oz47bDx0PHA8bDxjbGFzczs+O2w8Oz4+O2w8aTwxPjs+O2w8dDxwPGw8c3R5bGU7PjtsPDs+Pjs7Pjs+Pjt0PDtsPGk8MD47PjtsPHQ8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+Oz4+O3Q8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+O3Q8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+O3Q8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+O3Q8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+O3Q8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+O3Q8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+O3Q8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+O3Q8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+O3Q8cDxsPGNsYXNzOz47bDw7Pj47bDxpPDE+Oz47bDx0PHA8bDxzdHlsZTs+O2w8Oz4+Ozs+Oz4+Oz4+Oz4+Oz4+Oz6fIKNCi5/49OWp3yfsvosUA7kCqw==
Http-Referer: https://www.egypt.gov.eg/arabic/services/coc/COCService/commonpage/ReqStatus.aspx
Path: /arabic/services/coc/COCService/commonpage/ReqStatus.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +446
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +447
|
|
|
|
|
Hello Friends I am trying to find a method to prevent the users from opening the page directly without opening the home page / login page.For ex: I have 5 forms/pages in asp.net.If i am trying to open the any one of the page without opening first/login page it simply open. What should i do to prevent it.But there is some session concept. I don't to how to incorporate in my application. I am expecting somebody help in this issue.
Thank You very much in advance.
V.Rajagopalan:
|
|
|
|
|
There R many ways of doing it.
Method 1: (Using Sessions)
in the page load event of login page
create a session variable like Session["isValid"]="Valid";
In the load event of the other pages,
check if the session variable isValid exists.
i.e.
if( Session["isValid"]==null)
Response.Redirect("Home.aspx");
Method 2: (Using forms authentication)
This is the most reliable one and widely used by the developers.
Regards,
Arun Kumar.A
|
|
|
|
|
hi,
umm what is the difference between server.transfer and response.redirect
in what situation we would rather use redirect than server and vice versa ?
Thanks...
Regards...
|
|
|
|
|
atarikg wrote: umm what is the difference between server.transfer and response.redirect
The Server.Transfer will just continue with execution of the new file, sending output to the same Response object. This means that the url of the page will not change.
A Response.Redirect will create a redirection page that is sent to the browser. The browser will then request the new page from the server.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have installed on my laptop both:VS2003,VS2005.
When I run any VS 2003 application I got the error:
Error while trying to run project:unable to start debugging on the server.You dont have permission to debug the server.Verify that you are a member of the 'Debugger Users' group on the server.
But I have checked the Computer Management and I found the my account(an administrator account) is on of the mentioned group.
I tried many solutions for many days but it is no use.
I hope that someone could help.
I am too late but i will never give up
|
|
|
|
|
hi, my page contains a button which redirect you when you click on but if i click on that the new page should open in a new window i mean how can we set target in asp.net button..
|
|
|
|
|
hello, i used a System.Web.UI.WebControls.HyperLink
(the hyperlink) server control instead of button. It has a target property that u can set to _blank.
how ever i am not sure how to make the hyperlink look like a button.. perhaps by setting its ImageURL property?
HTH
full many flowers blush unseen!
|
|
|
|
|
As a redirect is done in server code, it's impossible to select a target for it. The target is decided before the request is sent to the server. If you want a different target, you have to set that in the browser before the request is sent to the server.
You can use Javascript in an html button:
<input type="button" onclick="window.open('TheNewPage.aspx', '_blank');" />
---
single minded; short sighted; long gone;
|
|
|
|
|
|
You have the right concept, but you are trying to add the javascript too late. YOu need to add the javascript to the logout button on the page load and it should be on the onClick event. That way the java script will be in the page when the user clicks the button to log out.
Hope that helps.
Ben
|
|
|
|
|
OMG i thank u soOoOoO much!! it worked at last!! this indeed was the problem!! i was searching for God knows for how many days!
may i ask you kindly to shed some light on the Add Attribute. i was trying (failed) to find.. how come we could Add an Attribute "onClick" to the loginStatus control.. although it doesnt have this as an Event in its list of events?
thank u so much for any info u might share
full many flowers blush unseen!
|
|
|
|
|
What you are seeing for the events are the asp.net events. When the web server sends html to the web browser all of the asp.net controls get translated to html controls. The html control has the onClick event. Javascript is always dealing with the html controls and their events, not the asp.net controls and their events.
Hope that helps.
Ben
|
|
|
|
|
i see!! very valuable information
thank you very much indeed!
full many flowers blush unseen!
|
|
|
|
|
Hi,
In my web application, I am executing an exe file using process.Start
I have 2 exe files in a directory.
1.First exe file is a stand alone one.
2.Second exe file will refer to another file(file2.ctf) in the same directory.
If I try to execute the first file, it is working fine.
But, for the second file , it says error message like:
Make sure the directory containing file2.ctf is on your dynamic load library
path(PATH on Windows,or LD_LIBRARY_PATH on Linux).
I think the exe file is not able to find the file2.ctr file.
Even after changing the environment variable PATH , it is throwing the same message.
But it is working fine in WindowsApplication.
Any help would be appreciated.
Regards,
Arun Kumar.A
|
|
|
|
|
You might need to change some info in your StartInfo object that is associated with the Process object. There is a property called WorkingDirectory off the StartInfo object. Set that to the correct directory and it should work.
Hope that helps.
Ben
|
|
|
|
|
Thank U very much.
I will try and let U know.
Regards,
Arun Kumar.A
|
|
|
|
|
Thank U very much.
It is working fine now.
Regards,
Arun Kumar.A
|
|
|
|
|
Hello All!
I have adobe professional 7.0 on my computer, and would like to use it for the web site I'm building. Does anybody know where I can find the classid for this, or know what the classid is forthis version.
Thanks!
Rudy
|
|
|
|
|
Hi,
Can we store objects such as Oledbconnection in web.config ? If we can do,then how can we do?
Thanks...
Regards...
|
|
|
|
|
atarikg wrote: Can we store objects such as Oledbconnection in web.config ?
You can store the connection string in the config.
|
|
|
|
|
so there is no way to store objects in web.config right ?
|
|
|
|
|
atarikg wrote: so there is no way to store objects in web.config right ?
You could serialise an object to XML, which you could then store in the config file. But it isn't designed for that.
My advice is to store the connection string in the config file.
|
|
|
|
|
Or U can use binary serialization and store it in another file.
Regards,
Arun Kumar.A
|
|
|
|