|
You can't that makes no sense whatsoever.
You stop SQL Injection attacks (mainly) by using named parameters.
|
|
|
|
|
Really Really Thank you For Helping ME .
Thank You Very Much BUT I Do That Before With Creating Delegate And I Think one Code Can Do Faster And This is Why i Sent That Question.
|
|
|
|
|
Use a parameterized query[^]; the word 'delegate' is out of place here.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Proper validations inside a parameterized stored procedures can help reduce SQL injection.
|
|
|
|
|
|
Hi All Developers I have A Problem :
How I can Change Opacity Of a Control IN Windows Application C#.net .. I Know How I can Change Form Opacity But How we can Change Control Opacity Like A button.
Thanx Developers
|
|
|
|
|
Why Are All Your Questions Written In Title Casing? It Looks Really Dumb In Normal Sentences. Stop It.
|
|
|
|
|
The native button doesn't support transparancy.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
the transparece color on the form can be used for this if he choses the transparece color to be the same of the button? or this would just make a hole in the form?
(like when you set the transparece color to be white and put a textbox on the form)
the form is really the only control that suport transparece?
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Sentenryu wrote: the transparece color on the form can be used for this if he choses the transparece color to be the same of the button? or this would just make a hole in the form?
It would show the button, as the button is not opaque, does it's own drawing, and knows nothing about all the fancy transparencies.
The simple solution is to use a label.
Sentenryu wrote: the form is really the only control that suport transparece?
Traditionally, even the form did not support that. I still do not see any added value in having the option.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
agreed, the only use for transparence in a form is to make that fancy game menus as mass effect have, but even then the usefulness of this is questionable...
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
What about the Johnny Foreigner button?
|
|
|
|
|
Controls don't support opacity, only forms do.
The only way to make it work is to create your own version of the controls you want and paint them yourself.
Or, use WPF instead of Windows Forms, but if you're not familiar with WPF the learning curve is pretty steep.
|
|
|
|
|
Hi I am creating a FTP library to connect securly on 990 port.
Below is the code
FTPFactory ftp = new FTPFactory();
ftp.setDebug(true);
ftp.setRemoteHost("207.161.116.232");
ftp.setRemotePort(990);
ftp.loginWithoutUser();
string cmd = "AUTH SSL";
ftp.sendCommand(cmd);
It is from the codeproject itself An FTP secure client library for C#[^]
But i get this error in loginWithoutUser function in readreply()
431 Unable to negotiate secure command connection
I tried it by disabling by firewall also but still get this error. Any one knows how to get around this?
|
|
|
|
|
If you've taken the code from the article, you should ideally post this question in the article discussion at the bottom of the article.
|
|
|
|
|
Problem:First C# 2008 app did not find the location of where the executable was located for the second program.
When my company deployed my C# 2008 and 2010 applications to a test server, one of the applications did not use the configuation set for where the executable was suppose to be at? Our network administrator found where the first program thinks the second executable was at.
Thus I am trying to determine why one of the programs did not take the setting it was given.
The location the first program was looking at was at:
c:/server name/share directory name/test/app1.exe.
The only way I can think this location was picked since on a few tries, the location of the executable as was at:
//server name/share directory name/test/app1.exe
Is this accidently? Should I have the network administrator reboot the test server to see if the c:/server name/share directory name/test/app1.exe. location request goes away?
|
|
|
|
|
dcof wrote: Should I have the network administrator reboot the test server Why? You are just guessing here. The first thing to do is to investigate what is wrong with your program.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I think you need to learn how to debug applications. Deploy debug builds to the servers, and use remote debugging to hook up to the application you think is at fault. Actually step over the code and see what's going on, rather than expecting us to throw random guesses as to what the problem could be. Deploy and pray is not a valid testing strategy.
|
|
|
|
|
Hi Everyone,
I am trying to create a web page that would allow users to create Citirx session for their needs. I was looking for any article or help available within the forum but I ended up hitting a brick wall. could someone guide me to the right article or any help with regrds to this?
Thanks in advance,
Philip
|
|
|
|
|
Arun Philip Reynolds wrote: I am trying to create a web page that would allow users to create Citirx session for their needs.
Doesn't Citrix offer their own (secured) webpage to host the applications if you install their server?
Arun Philip Reynolds wrote: <layer> I was looking for any article or help available within the forum but I ended up hitting a brick wall.
There will not be any articles on the subject; it's not a general request. Your best bet is to hit the Citrix-forums, and see if you can get support from their staff. I have no idea how they integrate the 'ica-files' into the dashboard, and I'm pretty sure that it depends on the logged in user (and his rights) which will be shown. So the real question here would be whether this is at all possible with the current Citrix-environment, or whether they closed that part out of security.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
ok, I Know about Enum.GetValues() , but what i want to know if is possible is to do a foreach through the values of a enum such as i can do the following:
foreach(var value in enum){
list.Add(new SelectListItem(){
Text = value.ToString(),
Value = ((int)value).ToString()
});
}
say that i have the following enum:
enum States{
Running,
Stoped,
Paused
}
the only way to accomplish what i described above is through the use of Enum.GetValues() and Enum.GetNames() ? or there is some syntax sugar?
I'm asking more out of curiosity than anything else
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Nope. No syntactic sugar. Since an Enum is not enumerable, you can't just specify the enum type itself. You must get the enum values in an array or other IEnumerable implementor first.
|
|
|
|
|
and the only way to do this and maintain the type of the enum is adding the values manually to the list...
I was thinking of someway to call a method with every possibly constant of a enum, but the only thing i got so far is something like:
foreach(int value in Enum.GetValues(typeof(MyEnum))){
MyEnum e = (MyEnum)value;
...
}
or if you prefer the linq way...
((IEnumerable<int>)Enum.GetValues(typeof(MyEnum))).Select(x => (MyEnum)x);
the only thing i don't understand is why i can't call the Select method directly on the return of Enum.GetValues() , maybe because Array implements the non-generic IEnumerable interface?
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Sentenryu wrote: the only thing i don't understand is why i can't call the Select method directly
on the return of Enum.GetValues() , maybe because Array
implements the non-generic IEnumerable interface?
LINQ works on the IQueryable interface, which array's don't support.
Arrays support the following interfaces:
ICloneable, IList, ICollection, IEnumerable, IStructuralComparable and IStructuralEquatable
The .Select extension works on any IEnumerable, including arrays, so I think your .Select example is a bit flawed. I don't know what you're doing, but...
|
|
|
|
|
First of all, i forgot to say thanks for your answer, so Thanks!
In the case i'm just getting a IEnumerable<SelectListItem> with the values of a enum to display as radiobuttons, the actual code (with the excuse of having names in portuguese) is this:
ViewBag.ApetiteOptions = ((IEnumerable<int>)Enum.GetValues(typeof(Apetite))).Select(x => new SelectListItem() {
Text = ((Apetite)x).ToString(),
Value = x.ToString()
});
Visual Studio (2012) gives me an error when I try to use the select method directly on the return type of the
Enum.GetValues() , I guess it's because this method returns a instace of Array (the base class), and not a instance of int[] .
int[] implements IEnumerable<int> , while Array implements IEnumerable , the Select method Expects IEnumerable<TSource> ...
while writting this post, i updated this bit of code to this:
ViewBag.ApetiteOptions = Enum.GetValues(typeof(Apetite)).OfType<int>().Select(x => new SelectListItem() {
Text = ((Apetite)x).ToString(),
Value = x.ToString()
});
I'm a little bit more happy now
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|