|
You can use this.
dt = ds.Tables["Orders"];
MemoryStream ms = new MemoryStream();
BinaryFormatter formatter = new BinaryFormatter();
// To convert to byte array
formatter.Serialize(ms, dt);
byte[] arr = ms.ToArray();
// To reconvert to data table
if(ms.Read(arr, 0, arr.GetLength(0)) != -1)
dt = (DataTable)formatter.Deserialize(ms);
Hope this helps...
|
|
|
|
|
Hi,
is there any way to detect http errors (like 404) with .net2.0 WebBrowser object?
I have WebBrowser object in my form. It navigates some addresses periodically. These addresses sometimes returns an error, like http 404 or 500 or so on. I want to handle these errors in my form. But i could not find a way to do this.
Thanks
-- modified at 7:20 Wednesday 6th December, 2006
ozgur.nevres
|
|
|
|
|
|
This is not what i mean. Let me explain my problem:
I have WebBrowser object in my form. It navigates some addresses periodically. These addresses sometimes returns an error, like http 404 or 500 or so on. I want to handle these errors in my form. But i could not find a way to do this.
ozgur.nevres
|
|
|
|
|
Perhaps this[^] article will help? In particular, handle the NavigateError event.
/ravi
|
|
|
|
|
Hi every one
This is my problem..
private void btnColorFac_Click(object sender, EventArgs e)
{
int i = 1;
int j = 0;
string val;
val = dgMatrix.Rows[2].Cells[2].Value.ToString(); //This Part of code works Correctly No problem
if (val[0] == '2')
{
dgMatrix.Rows[2].Cells[2].Style.BackColor = Color.Tan;
}
while(j != Classes)
{
for (i = 0; i < Periods; i++)
{
-->val = dgMatrix.Rows[j].Cells[i].Value.ToString();// Here is the problem, it says That Value = NULL !!!!
if (val[0] == '1')
{
dgMatrix.Rows[j].Cells[i].Style.BackColor = Color.Tan;
}
}
j++;
}
}
I don't know what to do
any hint will be very appreciated
Thanks in advance.
|
|
|
|
|
Can you give us a non-code explanation of what you're trying to do? It will help us understand your goal and either help us find the problem with your code, or potentially allow us to give you another way to achieve what you want.
|
|
|
|
|
well..
I have a program that performs (or apply you may say) some algorithms on a matrix..this matrix contains the code of some faculties + subject code (numbers) for example faculty of computer science + Software engineering subject = 21034 and etc...
I represented the matrix on a data grid view called "dgmatrix" and I'm trying to color the faculties to distinguish them.. so I'm trying to get to every cell and check out the first number which represent the faculty and then color it by my color that I choose.. thats all. Hope you got the idea..
Waiting for your reply
Best regards
|
|
|
|
|
can any body give me the regular expresion validator of a date.
It should be in the following format, example: 31/11/2006 (dd/mm/yyyy)
I need it quickly
Thanks.
|
|
|
|
|
quiteSmart wrote: I need it quickly
Then go Here[^]. People answer questions on this board in their own time. If you need an answer urgently then STFW.
|
|
|
|
|
For the formats
dd/mm/yyyy
dd-mm-yyyy
dd.mm.yyyy
(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d
|
|
|
|
|
A regular expression can not validate that the input is a valid date, only that it looks like a date.
---
b { font-weight: normal; }
|
|
|
|
|
I love the people who say "I need it quickly" Does that equate to "Stop what you're doing, and answer my question!!!"?
How about changing the tone to "I'm in a bind, with the boss breathing down my back"
|
|
|
|
|
Perhaps you should reply to the original poster?
---
b { font-weight: normal; }
|
|
|
|
|
Dear Friends,
I want to make project planner. like Visio. Any idea can give me for that?. how can i design that control. please help me.
Haridas.R
harisofttech@gmail.com
harisofttech@hotmail.com (online)
harizeenet@yahoo.co.in(online)
"Achievement is not a destination, its a journey "
|
|
|
|
|
|
I've looked into TWAIN and WIA but they both require legacy code interop.
Which doesn't make for a nice clean, easy to read project... and seeing as this will be my first imaging project I'm after somthing easy and clean and free of dabbling with C++/C# interop.
Any advice?
Thanks
|
|
|
|
|
Atalasoft has a commercial TWAIN library you could use. There is nothing in .NET for TWAIN or WIA, you need third party libraries to do it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hello frenz,
I tried using Process.Start().
My application needs to run in Windows Small Business Server 2003 & when I try to call the exe(which is also a .net application) from my application, it gives me an exception.
On googling came across the fact that Windows2003 does not support the Process Class with non-admin users.
check this link...
http://www.atalasoft.com/kb/article.aspx?id=10106&cNode=3D8W4P
I came across this problem once the implementation was over & tried to use the application with a non-admin user.
Please help me guys.. Can somebody work out some solution for this ?
Thanks in Advance
|
|
|
|
|
jamesjk wrote: I tried using Process.Start().
Your other option is to pinvoke ShellExecute itself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks Graus.
In fact I was also thinking of the same solution.
But am struck on how to pass the handle to window.
could u pls help me with some code snippets
Once again thanks for the suggestion
|
|
|
|
|
I'm not sure how you mean ? www.pinvoke.net is bound to have examples of how to use shellExecute via pinvoke.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Actually, the problem is with the Process class under the .NET Framework 1.0 and 1.1 (Visual Studio .NET 2002 and 2003). The Process class depends on getting process information from the Performance Counters. But, Windows Server 2003 doesn't support giving performance counter information to non-Admin users, so it breaks the functionality of the Process class.
This problem was fixed in the .NET Framework 2.0 (Visual Studio .NET 2005) because the Process class was re-written to not depend on the performance counter information.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks Dave..
That was quite informative...
I'm using framework 1.1 for my application..
I'm not at all familiar with framework 2.0..
So could you pls tell me Can my problem be solved just by compiling my application with frame work 2.0. Would there be any kind of migration issues?
Since I'm in a desparate situation would appreciate each and every support given by U.
Once again Thanks for the support
|
|
|
|
|
jamesjk wrote: pls tell me Can my problem be solved just by compiling my application with frame work 2.0.
Possibly.
jamesjk wrote: Would there be any kind of migration issues?
The only way to tell is to try it. There ARE breaking changes between .NET 1.x and 2.0.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|