|
First of all this should be in ASP.Net forum.
Use the DirectoryInfo and FileInfo classes to perform the search.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
ok,
And it can search in web sites too?
BTW- i want to do it in C# windows application and not in ASP.NET
|
|
|
|
|
Well, that can do the search everywhere provided you have the read access in that website.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
OK . But in which format do i need to write the website URL?
like this?
DirectoryInfo myDir = new DirectoryInfo("http://www.yahoo.com");
?
Or how?
|
|
|
|
|
Heloo Experts!!!
I am upadating date in my grid.on refresh button click it must show upadated date. i m using Datagrid.refresh() method for same.But cant work;
tel me way.using C# & SQL 2005
Please help!!
|
|
|
|
|
Hi my friends;
I have a different problem. I have a main form that is MDI parent of other forms. I use speech recognition, and I started it as a thread in my main form. It works fine while opening child forms or closing them. But problem begins here. For example I have an active MDI child that have a method or button click event. How can I call the method of my active form from it's MDI parent. I want to do this because I use speech recognition, I want to guide program with my voice commands. Like following I want call DoJob method.
Form frm = this.ActiveMdiChild;
frm.DoJob();
Thank you.
|
|
|
|
|
Not sure which exactly is your problem, but you can do it this way:
1) In the child form, the DoJob() method must be either public or internal (in order to enable access from the parent form).
2) In your parent form you can do something like:
ChildForm cf = (ChildForm)this.ActiveMdiChild;
cf.DoJob();
where ChildForm is your child form's class name.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
You mean you need to call the method accros threads? If so:
frm.Invoke(new MethodInvoker(delegate() { frm.DoJob(); }));
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hello Friends.
Suppose I have two functions name
GetBUUser(); && GetISUser(); And both these function call a function name
LoadUserBUStatus(); Now in LoadUserBUStatus() function how do I know which is the caller function..? I hope I made myself clear..
Thanks in Advance..
Johnny
|
|
|
|
|
You need to use Reflection and the Stack. Check out this[^] article.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Ok, I'll bite, why not use a wherefrom parameter, reflection and the stack seems both convoluted and expensive. I can understand if he has no control of the design of the calling methods but he implies he is writing them.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
When I read the question I immediately remembered needing to do something like this before and how I solved it. It was painful which is why it's imprinted on my memory and popped straigt to the tips of my fingers.
In my situation, I couldn't alter the parameters received without breaking other stuff (I can't remember why an overload wasn't allowed, but there was a reason), so sending an additional parameter in the calling method wasn't an option for me.
I agree, a 'whereFrom' parameter would definately be easier for the OP.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
When playing with the stack at runtime, remember that the JIT is allowed to perform inlining, so stack frames might disappear in release build (possibly even depending on the installed .NET version - the inlining heuristics are tuned from time to time).
You'd have to mark all three GetBUUser(), GetISUser() and LoadUserBUStatus with MethodImplOptions.NoInlining to be safe from that.
But on 64-bit .NET, even that isn't enough: there the JIT will perform the tail call optimization, which can also cause stack frames to disappear. Unfortunately, there's no way to disable tail calls.
You should avoid analyzing the stack at runtime at all costs.
|
|
|
|
|
Why not pass in a WhereFrom parameter?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Dear All,
currently i am using Socket class to send and receive files from FTP.
every thing works fine and I am really happy with that. My concern is i can download files at fixed number of bytes as i am fixing my buffer to be send to server at 16*1024 bytes (16KB). I am looking for a method where i can download files from ftp at my internet bandwidth and the same should apply for uploading too.
i am looking to hear from u guys
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
Try the OnValueChanged event. Check if all four got a value, and if true, write the contents to the textbox
I are troll
|
|
|
|
|
|
The OnValueChanged should fire for each combobox, but you'll only need one event-handler. Once you written the code for ComboBox1, you can reuse it by hooking up the event from ComboBox2, ComboBox3 and ComboBox4.
I are troll
|
|
|
|
|
Can I add a page form1.aspx as ContentTemplate and pageTitle of the page form1.aspx as HeaderTemplate from c# Programaticaly?
Please help me with code.
shahdat
modified on Sunday, May 24, 2009 5:43 AM
|
|
|
|
|
hello
Having trouble with DESCryptoServiceProvider - specifically, key size of public key from extracted from "mykeys.snk" (using sn.exe, byte[160]) not compatible with DESCryptoServiceProvider which is expecting byte[24].
Here's how I extract public key from snk file:
<br />
FileStream oKeyPairFileStream = File.OpenRead("mykeys.snk");<br />
System.Reflection.StrongNameKeyPair oKeyPairFile = new StrongNameKeyPair(oKeyPairFileStream);<br />
byte[] btPublicKey = oKeyPairFile.PublicKey;<br />
return btPublicKey;<br />
Here's how I do encrypt:
<br />
byte[] btGeneratedKey = null;<br />
tDESalg.GenerateKey();<br />
btGeneratedKey = tDESalg.Key; <br />
tDESalg.Key = btKey;
<br />
tDESalg.Mode = CipherMode.ECB;<br />
tDESalg.Padding = PaddingMode.PKCS7;<br />
<br />
CryptoStream cStream = new CryptoStream(oMemStream,<br />
new TripleDESCryptoServiceProvider().<br />
CreateEncryptor(btKey, tDESalg.IV),<br />
CryptoStreamMode.Write);<br />
This would give error message:
<br />
"Specified key is not a valid size for this algorithm."} System.Exception {System.Security.Cryptography.CryptographicException<br />
I got a feeling you can't use key from snk file to encrypt by way of DESCryptoServiceProvider, am I right?
Thanks
dev
|
|
|
|
|
Hello Experts!!
I m passing parameters customerno. n srno. to crystal report.it must take same record only whose no and srno same wid passed one.But in my report it shown correct record but many times.
e.g.if i pass custno.is 2 and srno. is 3 then it must show corresponding details of match 2&3.Now it shown like this...
Custno Srno name address
2 3 XYZ ABC
2 3 CYZ SED
2 3 XYZ ABC // Extra lines
2 3 CYZ SED
Help Me!!!
|
|
|
|
|
You don't give nearly enough information to get help - but my guess would be that your report links to other tables and so you get one row for each of the records on those tables as your linkage is not correct.
Try looking at the SQL that Crystal generates and running that - it might point you in the right dircection
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
hello
can I generate a test X.509 certificate using "makecert.exe", taking "snk" file from "sn.exe" as input?
Thanks
dev
|
|
|
|
|
I'm having a problem with the ThreeState property. Currently, the checkBox's only have the values of "0" and "1", and I need the ThreeState to equal "2" somehow!
This code creates the checkBox's:
private void makeArea_Click(object sender, EventArgs e)
{
if ((areaXNumber.Value <= 11) && (areaYNumber.Value <= 11))
{
arrX = Convert.ToInt32(areaXNumber.Value);
arrY = Convert.ToInt32(areaYNumber.Value);
panel1.Controls.Clear();
int x, y = 12;
for (int j = 0; j < arrY; j++)
{
x = 12;
for (int i = 0; i < arrX; i++)
{
CheckBox chkb = new CheckBox();
chkb.Location = new Point(x, y);
chkb.Size = new Size(15, 14);
panel1.Controls.Add(chkb);
x += 21;
}
y += 21;
}
}
else
{
MessageBox.Show("Lower your checkbox amount!");
}
}
This code appends it all to a StringBuilder then posts it to a richTextBox:
private void insertArea_Click(object sender, EventArgs e)
{
StringBuilder area = new StringBuilder();
if (panel1.Controls.Count > 0)
{
area.AppendLine();
area.AppendLine("arr" + areaArrayNumber.Value + " = {");
for (int i = 0; i < arrX * arrY; i++)
{
if (i % arrX == 0)
area.Append("{");
area.Append(Convert.ToByte(((CheckBox)panel1.Controls[i]).Checked));
if (i % arrX == arrX - 1)
{
if (i + 1 == arrX * arrY) area.Append("}\n");
else area.Append("},\n");
}
else area.Append(", ");
}
area.AppendLine("}");
}
else
MessageBox.Show("There are no checkboxes!", "Error");
scriptForm.Text += area.ToString();
}
What this code does, is let the user decide how many checkBox's on the X axis, then the Y axis, so let's say numericalUpDown1 and numericalUpDown2 value's are equal to 3. This is what the outcome is currently (1 = Checked/0 = Unchecked):
arr1 = {
{1, 1, 1},
{1, 0, 1},
{1, 1, 1}
}
I want the ThreeState to be able to do this (2 = Third State/1 = Checked/0 = Unchecked):
arr1 = {
{1, 1, 1},
{1, 2, 1},
{1, 1, 1}
}
I hope this is enough information to help! If not, please let me know. I appreciate your time reading this!
|
|
|
|