|
ok yeah i tried by ur method as wzunzip c:\filename.zip c:\folder\
it really unzipped. wow
but if i replace it for a cabinet extractor exe file, it asks for password
what am i to do to unzip the exe file?
suggestions please......
|
|
|
|
|
Only you can answer that question since your the one holding the .EXE.
Have you tried Whatever.EXE /?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello,
I have a page, which has another page nested in a frame inside it. the parent page loads a UserControl object, which can has text fields, checkboxes, and other UI components on it, then it passes it to the framed page using Session[].
The user than enters text into the control.
when the user is done, they press a button on the parent page, and I try to get the UserControl using the Session[], I get it successfully, but I dont get any of the updated properties of the child controls on the UserControl. for example, if the user entered text into a text box, the .Text property of that textbox will still be what it was when the control was created.
Any ideas?
thanks
|
|
|
|
|
Make the viewstate property of it to true.
|
|
|
|
|
the control is in a .ascx file, it doesnt have any code behind or anything.
I added the following at the top of the file, but it didnt seem to make a difference.
<%@ Control EnableViewState="True" %>
|
|
|
|
|
Hello,
I have the following situation:
a CurrencyManager with which I put the informations from a database into some text/combo boxes on a windows form;
One of the fields from the database is of true/false type, but for that information to have meaning for the user I want the combobox not to display the 0/1 values (from the database) but some strings, like "started"/"stoped".
I do not know which is the easiest way to do this (neighter a easy way to identify the current record from the database to put a "if" statement on the 0/1 values of the field)... the binding manager only shows me the info in the database...
I would appreciate any idea,
Thank you,
Cristina
|
|
|
|
|
suppose I have a struct type structA; and an array
structA [] structArray = new structA[5];
how to test structA[0] is empty?
cause struct is value type, can not compare it with null.
Thank ya !
|
|
|
|
|
You have already answered your question. When you create the array at each element a structure with all its members set to their default values is generated. Its like working with integers.
|
|
|
|
|
There's no facility provided by the CLR to do it, you have to do it on your own. The simplest way is to have a bool variable that's set to true on any property/method access. You can then check if the bool variable is value and know that it's just been initialized.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
|
I think the problem stays the same. Here in Foo struct int a, b are initialized with its default values 0. What happens if we want to set "a[0].a = a[0].b = 0"? Then the check a[0].Equals(Foo.Empty) would succeed when its not empty anymore..
I think you need some sentinel value - a special or illegal value. For example you could use -1 as a sentinel. Default int value 0 also would do but you have to be sure that this value won't be treated as legal value.
|
|
|
|
|
|
not 'illegal'.. sentinel value.
...The point here is to check if the struct has been used or not....
Try this:
void SomeMethod()
{
Foo[] a = new Foo[2];
if (a[0].Equals(Foo.Empty)) // does a field by field comparision in valuetype
MessageBox.Show("a[0] = Foo.Empty");
else
MessageBox.Show("a[0] != Foo.Empty");
a[0].a = a[0].b = 1;
if (a[0].Equals(Foo.Empty))
MessageBox.Show("a[0] = Foo.Empty");
else
MessageBox.Show("a[0] != Foo.Empty");
a[0].a = a[0].b = 0;
if (a[0].Equals(Foo.Empty))
MessageBox.Show("a[0] = Foo.Empty");
else
MessageBox.Show("a[0] != Foo.Empty");
}
.......................
Output:
"a[0] = Foo.Empty"
"a[0] != Foo.Empty"
"a[0] = Foo.Empty" !!!! which means that this struct haven't been used before!
..but we used a[0] before...
|
|
|
|
|
|
I need a program that will run on a server that will be sitting idle waiting for a website to send it an xml file. when the xml file gets sent to the server I need to parse the xml file and insert some of the data into a oracle database.
The program needs to be a http listener.
the xml file will be small.
Where do I start for making this program?
Does anyone know if Oracle has a function like this built into it?
Thanks all.
|
|
|
|
|
You can do it in .NET really easy.
All you need to do is a Web Service, the site will call a method on that web service and pass the data, and then the web service will insert into Oracle.
|
|
|
|
|
How do you do this??
Can you make it so that an automatic method is called all the time. I cant make the server call a method. all I can do is enter in the address of my server and that is what the other server will send the XML file too.
I know usually you need to call a method, but is it possible to have it call a default method or somehting like that? Any Ideas?? Thanks all.
|
|
|
|
|
Hi.
1) I have a table in a database with a column of type DateTime. Im my application i have a "select" query in which i want to compare a local DateTime variable called mydate with the one in the database, something like:
" SELECT.... WHERE myTable.date1<'"+mydate+"' ".
Can you tell me the right syntax for this?
2) I have SELECT command and i read the result with a reader (while(myReader.Read()). The problem is that this command retrieves me at least 2 elements (let's say rows) from the table, but i only can read the first one. Is there a solution?
Thanks!
|
|
|
|
|
1. Use parametized queries. See SQL Injection Attacks and Some Tips on How to Prevent Them[^] for information on why.
string sql = "SELECT ... WHERE DateField < @Date";
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.Parameters.Add("@Date", mydate);
SqlDataReader rdr = cmd.ExectueReader()
while(rdr.Read())
{
} And that also answers 2.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Anyone knows how to change the MAC of the first Network adapter using C#?
Thanks
|
|
|
|
|
Why do you want to?
Maybe this helps -->
MAC INFO[^]
I do not mind getting old. It beats all the other options that can think of.
|
|
|
|
|
I need this feature for a LAN application, I can provide to the user an interface with IP, Mask, Gateway and DNS configuration but not the MAC, so if anyone tryed this in C# please let me know.
|
|
|
|
|
Yeah, but WHY would you want to change the MAC? There are valid reasons to do so, but they are rarely ever used.
Changing the MAC address doesn't follow any "standard" methods. It's going to be different from vendor to vendor, hence, you'll need to consult with the vendor of the card your using to get the methods they supply in their drivers.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is it possible to share static variables across AppDomains?
I want to write an application like NUnit (for a different purpose). I wanted to replicate NUnit's ability to recognize test fixtures and tests by just placing attributes over my classes and methods. But my application has some variables that I'd like the dynamically loaded assembly (loaded in a different AppDomain) to be able to use. I can pass them as MBR objects, but then for that I've to force implementors of the dynamically loaded assembly to implement a particular interface.
It would be nice if I could just "inject" my static variables into the newly created AppDomain so that the loaded assembly can use it directly. Is there any way I can do it?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi
I have a set a breakpoint on a method in which a Thread is being started,after stepping through,its giving error
An unhandled exception of type 'System.Threading.ThreadStopException' occurred in mscorlib.dll
Additional information: Thread was being stopped.
and this is giving on line where its accessing TextBox,most prolly unable to access MainThread?
how could i resolve this?
Thanks
MyBlogs
http://weblogs.com.pk/kadnan
|
|
|
|