|
i can do this on jsp but how this could be done in asp.net
thanks in advance
|
|
|
|
|
this.FileUpload1.PostedFile.ContentLength
I didn't get any requirements for the signature
|
|
|
|
|
hi!! i am using a 3rd party dll in my project to html messaging like this message board in codeproject or a scrap like thing in orkut.
but every time when i pressed the send button of message it gives me error and message is not stored in db.
the error type is:
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder2$TextBox22="dfg<br>").
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder2$TextBox22="dfg<br>").
Stack Trace:
[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder2$TextBox22="dfg<br>").]
System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) +3307682
System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, String collectionName) +108
System.Web.HttpRequest.get_Form() +119
System.Web.HttpRequest.get_HasForm() +3309630
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +45
System.Web.UI.Page.DeterminePostBackMode() +65
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.messages_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\alok\deb20b3e\4118a126\App_Web_gd1it9hc.2.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
how to solve this.
|
|
|
|
|
Try reading the message genius.
Alok sharma ji wrote: You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Sorry. I was still mad at you for earlier. I didn't mean to make fun. You can disable the validation but it is a security risk. The built in request validation blocks people from using scripts to hack your server.
I didn't get any requirements for the signature
|
|
|
|
|
yes ! i assume that it could be risky but how then they(other sites like cp or facebook , orkut, etc.) manage that risk.
|
|
|
|
|
Alok sharma ji wrote: yes ! i assume that it could be risky but how then they(other sites like cp or facebook , orkut, etc.) manage that risk.
I can't help you with that one. I've never turned off the validation on an internet site. I've only turned it off on a intranet site which has less risk.
I didn't get any requirements for the signature
|
|
|
|
|
|
If you turn off validation it's up to you in your codebehind to validate all input before using it. Google "SQL injections" if you are writing to a database for example.
|
|
|
|
|
|
Please help with regular expressions on the ff. links
http://localhost/Documents
http://localhost/Documents/
http://localhost/Documents/2009
http://localhost/Documents/2009/
http://localhost/Documents.aspx?Year=2009
http://localhost/Documents/2009/a.txt
These RULES doesn't seem to work.
^Documents/?$
^Documents/([^/]+)/?$
^Documents/([^/]+)/([^/]+)/?$
Thank you very much in advance.
Gerri
|
|
|
|
|
Dear Guys,
Please Help or reslove this prob.My pro is that -- my asp page is open which includes two radiobuttons,and when i selected both radio buttons,both are checked,so please give a suggestions hw will i resolve it so that only one radiobutton can be checked at atime...
Reply Soon.
|
|
|
|
|
Use a Radio Button List (only one option may be checked at a time).
Or write some javascript to uncheck one when the other is checked.
I didn't get any requirements for the signature
|
|
|
|
|
oh! boy!!! dont you have any basic ideas of asp.net
well you have to group those radio buttons by properties window(may be you know that thing) if you are using VS and also you can use the radio button list
cheers!!
|
|
|
|
|
Alok sharma ji wrote: oh! boy!!! dont you have any basic ideas of asp.net
No, I don't know a damn thing about asp.net. I've only been working full time doing ASP.Net development for about 8 years now. I have only successfully implemented about 100 corporate applications. As a matter of fact, most of my posts are just nonsense. I don't think I've helped a single person on this board ever.
Thanks for your comments.
I didn't get any requirements for the signature
|
|
|
|
|
sorry! its a mistake i thought its goes to the questioner but again sorry
mis clicking,..........oh my god wat a fool i m
|
|
|
|
|
oh! boy!!! dont you have any basic ideas of asp.net
well you have to group those radio buttons by properties window(may be you know that thing) if you are using VS and also you can use the radio button list
|
|
|
|
|
Hi I am trying to use SaveFileDialog and want to get save file path from this dialog.
I am using VS2008 and Language is C#..Please help with sample code.
|
|
|
|
|
try this
//if dateStr doesn't contain \ at the brginning it should be
string path = System.IO.Path.GetDirectoryName(saveFileDialog1.FileName) + "\\" + dateStr;
hope it helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
I am working in ASP.NET..
Is there anyother option?
|
|
|
|
|
what are you trying to do exactly ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
You two are as retarded as each other. ASP.NET does not have a save file dialog, nor can it. You can pass a file to the browser and it will let you specify where to save it, but you can't access that info.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
You're an idiot. Don't answer people if you have no idea.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
What are you trying to do?
There is no save file dialogue in ASP.Net.
The client (browser) can post a file to the server (where your C# code is executed).
You may save the file to your network somewhere, but you can't write the file on the client's machine. What is it that you are trying to accomplish?
I didn't get any requirements for the signature
|
|
|
|
|
On Button Click...Application must ask user to save his file manually...
I want the path selected by user..
|
|
|
|
|
Well you want to do something like this.
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;filename=test.txt");
Response.Charset = "";
Response.Write(System.IO.File.ReadAllBytes(@"C:\test.txt"));
The user should then have the option to save the file or open it.
I didn't get any requirements for the signature
|
|
|
|