|
OOOOKKKK..........JOAT-MON
YES...you are absolutely right. There was a Streamwriter object that was called when the file was imported. I normally enclose them in a using statement so that they will close automatically, but for some reason I did not do it this time. I have made the correction and it is working perfectly now. Thank you very much for your insight. I am marking your answer as THE answer. Kudows and Best Regards, Pat
|
|
|
|
|
Good deal! I'm glad you found it and got it working.
Jack of all trades ~ Master of none.
|
|
|
|
|
hey guys. plz help me.i want to validate the no(port no)in text box . i m using the following regex to validate...i just want 0123456788( only numbers) to be entered in the text box..
Regex regex = new Regex(@"^[-+]?[0-9]*\.?[0-9]+$");
Thanks in Advance
|
|
|
|
|
1: there's a regex forum
2: this is trivial: \d* (or \d+ if you want to force at least one), are you sure you understand regex? The one you pasted looks like a floating point validator.
3: if you just use a numeric text box (you may have to write one which validates on text change and rejects some key presses) or a NumericUpDown then you don't need a regex validation string anyway
|
|
|
|
|
Regex is, IMHO, not indicated here, at all.
You could write an event handler for the OnKeyDown event to filter other keys than numeric ones.
But validation would better be something like :
private void TextBox_Validating(object sender, CancelEventArgs e)
{
ushort port;
if (!ushort.TryParse(yourTextBox.Text, out port))
e.Cancel = true;
}
No memory stick has been harmed during establishment of this signature.
|
|
|
|
|
|
A "port" number in standard computer nomenclature has a specific range as well.
|
|
|
|
|
Use NumericUpDown control or alternatively a MaskedTextbox.
V.
|
|
|
|
|
I have written a C#.Net application to convert any image into png image. I have basically used the call
Image.Save(outputFilename, ImageFormat.Png);
I get the proper png file compressed to smaller size and working fine.
But my customer wants the application to allow users to modify/vary the sliding window size(deflate ratio) of the compressed png image. So I want to know if whether I can actually supply the deflate ratio to the .Net Framework and the framework compresses the image to a png file with that deflate ratio(sliding window size).
Anybody can give suggestions/inputs?
|
|
|
|
|
|
hello.
i have a server client app
when client is on ,server send arraylist object for client.
for first client ,server can send arraylist for client and when second client connect,server can not send arraylist.
may code:
1 BinaryFormatter bf = new BinaryFormatter();MemoryStream ms = new MemoryStream();byte[] b;bf.Serialize(ms, listclient);b = ms.GetBuffer();
it give this error:
{"Type 'chatserver.client' in Assembly 'chatserver, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable."}
|
|
|
|
|
Mark your 'chatserver.client' class with the Serializable[^] attribute.
|
|
|
|
|
The build-in binary formatter is overrated anyway. Everyone seems to use it, but it's ridiculously slow and generates lots of crufty data.
|
|
|
|
|
Any chance, any one can help me put together a
simple C# program that accesses a website, logs in
with a user name and passcode and clicks Continue?
Or do you know of a sample project that I can find?
Please, any response any one can give me will be
greatly appreciated.
Sincerely,
Danielle Brina
|
|
|
|
|
Hello overworked graduate student , see the answer on this[^] page for an example of how to do this.
/ravi
|
|
|
|
|
Please don't cross-post.
(Oh shoot, I hit the wrong post, sorry.)
modified 18-Mar-12 22:03pm.
|
|
|
|
|
|
|
|
Depends on the website. Often you just send a POST and keep track of the cookies.
|
|
|
|
|
can any one help me i am facing problem in writing query in my project.i am taking four link buttons in one page(test.aspx page) when i click on Test1 link it should show me the result on show page (show.aspx page) by retriving the data stored in database for Test1 table similarly if i click Test2 link it should show me the data on same show page(show.aspx page) retriving data from database for test2 table same for Test3 and Test4 link.database iam using here is sql server 2005.
|
|
|
|
|
And? What problem are you having?
Which part of this is causing your problems?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
|
Try this.
Add 4 'div' in your page and then add the controls inside the 'div' control. Assign the 'id' name and runat='server' in that div's. Now goto the link button page, if we click first button means just show first div,hide the other two div's.
Note: Pass a paramater to div page using Query String (or) Session object.
and to get quick answers post your question in Correct Forum[^]
|
|
|
|
|
Try something and post some code here if you run into issues.
Someone will try and help you.
|
|
|
|