|
How do I change the Directory where A resides? A is perfect where it is, I'm not sure what you mean...
|
|
|
|
|
i assume app A uses applicationStartupPath to find where to put the INI, which when started from App B becomes the startup path of App B instead of where it was executed from.
You could try passing a parameter to application A that tells it its startup path, but you would need to Modify App A to handle the parameter.
Something like a global variable with the startupPath, then if paramter is present set it to the passed paramter otherwise use the Application.StartupPath when no paramter is passed
|
|
|
|
|
|
How secure is this code, I have a web app that checks someone security level?
is it possible from a user to change int LocalStatus = 5 to int LocalStatus = 6?? (for example)
protected void btnUpdateStatus_Click(object sender, EventArgs e)
{
try
{
int LocalStatus = 5;
if (LocalStatus >= Profile.UserPermissionLevel)
{
object values = gvRasiedECN.GetRowValues(gvRasiedECN.FocusedRowIndex, new string[] { "OID" });
ENG_UpdateECN UpdateECN = new ENG_UpdateECN(Profile.UserID, Convert.ToInt32(values),"meh");
}
}
catch(Exception ea)
{
ErrorLog = new ErrorLog (ea.ToString(), "PageName");
}
}
|
|
|
|
|
As the '5' is hardcoded and i assume stored on server i wouldnt think a user would be able to access without the source code or source data
|
|
|
|
|
Hello,
Can you recommend any PDF creation library in C sharp. There are several at codeproject but most of them have bug reports in messages and aren't supported.Does anyone have any experience with any PDF libraries in .NET?
|
|
|
|
|
|
PDFNet is very use full for pdfcreation ,editing ,drawing ,etc
Sanjoy Bagchi
S/W Engineer
|
|
|
|
|
|
|
|
I once encountered similar problem. I deleted the solution's user option file. It's usually located it the same directory as your solution file. It's hidden by default and has the same name as your solution file, but with ".suo" extension. I'm using VS2005.
Excuse me for buttin' in, but I'm interrupt driven.
|
|
|
|
|
helo.. i have a windows service running is there any code to capture the keystrokes from the user ... thans...
|
|
|
|
|
max.4u wrote: helo.. i have a windows service running is there any code to capture the keystrokes from the user ... thans...
First, tell us why do you need to do that?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i am writing a serivce for the child safe internet access... when the service gets through any prohibited words or sentences then it should end a mail to the users.... so i need to capture the keystrokes.....
|
|
|
|
|
Write a webbrowser with that built-in.
|
|
|
|
|
i am writing a windows service not a web service.... any idea..
|
|
|
|
|
I meant write a webbrowser that logs keystrokes and make the kid use it to access the Web.
|
|
|
|
|
i 2 had this idea first... but this cannnot go long... like chat programs.. which are many so may be a windows service may help/...
|
|
|
|
|
you mean a 'key logger'? very naughty lol
I found a good article somewere once, dont know where thou so you will have to look yourself.
People here dont usually help with this sort of question unfortunately, I would post like but i really dont remember where it was or what I searched for so
|
|
|
|
|
Hi All,
I have a struct that contains data such as ID, Name etc.
I have a List of instances of that struct.
I then have a method which returns a struct from the list based on an ID value pased as a parameter.
But my problem is if the id does not match any of the structs in the list I would like to return a Null value. Any ideas how to get around this?
I have thought to have a bool property in the struct that states if null or not null, but i would ideally prefer to return a null value rather then create an empty struct with only IsNull = true set and then returning that.
Thanks for any advice offered
|
|
|
|
|
Make your method return an instance of Nullable<struct> (reference[^]).
It automatically adds an "HasValue" property and can be also compared with null.
|
|
|
|
|
Well I will mark as answer as it does answer the question I posted , but appears this way means the struct values are read-only.
I think I will stick with the IsNull property for ease of use, thanks thou
|
|
|
|
|
While it's true that the "Value" property is read-only, you can always assign your nullable variable to an instance of the struct using the = operator. See the following code snipper
public struct MyStruct
{
public int Field1 = 0;
public int Field2 = 1;
};
class Program
{
static void Main(string[] args)
{
MyStruct str = new MyStruct();
str.Field1 = 1;
str.Field2 = 2;
Nullable<MyStruct> nul = null;
if (nul.HasValue)
Console.WriteLine("VALUE IS {0},{1}", nul.Value.Field1, nul.Value.Field2);
else
Console.WriteLine("VALUE IS EMPTY");
nul = str;
if (nul.HasValue)
Console.WriteLine("VALUE IS {0},{1}", nul.Value.Field1, nul.Value.Field2);
else
Console.WriteLine("VALUE IS EMPTY");
}
}
|
|
|
|
|
Thanks, but you cant assign nullable struct to struct i.e. str = nul;
which means I wouldnt be able to save the str back to the list, without copying the values from null to str first.
|
|
|
|