At design time there are a lot of properties that are available for a particular form or a control in the form. Those properties can be changed in the design time. But how do I disable/hide any one of these properties so that the designer cannot edit/update that property while designing. For ex: Say there is a button in a form. I want to disable the Image property in the Property List, so that the designer of the form cannot edit/put any Image on the Button. Is there any function/api present that can do so?
The exception is being thrown is a SqlException? Or is it from the page? It is more likely the exception is being thrown from the page as a HttpRequestValidationException. Setting ValidateRequest=true on the page will stop this, however it opens you potentially dangerous attacks.
Indicates whether request validation should occur. If true, request validation checks all input data against a hard-coded list of potentially dangerous values. If a match occurs, an HttpRequestValidationException exception is thrown. The default is true.
This feature is enabled in the machine configuration file (Machine.config). You can disable it in your application configuration file (Web.config) or on the page by setting this attribute to false.
This functionality helps reduce the risk of cross-site scripting attacks for straightforward pages and ASP.NET applications. An application that does not properly validate user input can suffer from many types of malformed input attacks, including cross-site scripting and Microsoft SQL Server injection attacks. There is no substitute for carefully evaluating all forms of input in an application and making sure that they are either properly validated or encoded, or that the application is escaped prior to manipulating data or sending information back to the client.
Seems the wrong forum (C++ one is more appropriate), anyway...
you have to pass valid pointer to a validLVITEM struct, i.e. a properly initialised struct (you have to take special care with pszText and cchTextMax members, the former must point to an allocated buffer, the latter must contain the size of the buffer itself, see MSDN [^]).
Hope that helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
I want to generate random numbers to rename files when i uploaded employees CV.
suppose first i uploaded a cv for emp1 name aa.doc i rename it a random numbers.
then i uploaded a cv for emp2 name bb.doc. but also that files i remaned it randomly.
Have you looked and tried to follow what the error description says
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Is the virtual directory configured as an application in IIS?
I'm reasonably new to C# and have recently been coding parts of a C# user interface which operates in tandem with a C/C++ back-end. Things have been going O.K. until I had to make use of a function, whose prototype looks like this:
int functionName (const char* param1, const char* param2, char* nastyParam)
In my C# code, I have been dealing with the const char* params by mapping them to C# strings...that has been working quite well. Now the problem with nastyParam above is the intention is for the function to (possibly) return some string value to the caller via nastyParam. The following is what I have done thus far for the function above:
I've been trawling the net for solutions and came across a suggestion which involved mapping the char* to a C# IntPtr (as above)...the explanation in that article made sense to me, so I gave it a go but no luck thus far.
you want a StringBuilder of sufficient capacity.
And it would be safer to pass the capacity (of buffer size) as a parameter as well
(so your C/C++ function can be made safe, in order to prevent buffer overflow problems).