|
The button doesn't make any action in your form unless you tell it what to do. You can tell the button to make some action (clear the textbox) in the button1_click action.
here you have it empty:
void button1_click(object sender,eventargs evt)<br />
{<br />
}<br />
Just put in it some code, for example, you can put
TextBox1.clear();
this will clear the text box.
best regardes,
Jamil Abou Khalil
|
|
|
|
|
Actually I think it was a question about the working of the viewstate.
I think if you redirect to anotherpage on button click, the come back to your page, the textbox value should'nt be there...
_____________________________________________________
Yea! I could be wrong...
|
|
|
|
|
Hi,
I had written some code inside the button click event, i expect the text box to be cleared automatically after a post back..
|
|
|
|
|
Hi,
I am making my first .Net Remoting program in Visula Studio 2005. When i add the the namespace of the server in the client at the top like this:
using BasicServer;
and then compile my program, it gives error message, Unknow namespace or type. Please tell me how to compile this program. I am making both Client and Server on the same machine. I have not included reference to the dll of my Server. Should i add that too? I intend to test these on different machines.
Thanks in advance...
Regards,
Wasif Ehsan.
|
|
|
|
|
Hi,
if u are going to use your server class directly in your cliend , then u shall use soapsuds to extract the type information, add reference to it and then include the namespace. But in any remoting scenario, it is recommended to go with a Common interface / abstarct class between client and the server and thereby adding reference to the dll containing the interface / abstract class. Make your remoting server class implement the interface / inherit the abstract class,
Hope this helped you.
Love all,
|
|
|
|
|
Hi guys,
I have a specific problem.
A so called "Diagnostic Box" of some mechanical machinery senses some measurements/parameters of the machine and stores them in 3 types of text files. Type 1 contains parameter 1-6, Type 2 contains parameter 7-14, Type 3 contains parameter 15-16. So we have 16 different parameters of machine that are storing in these 3 types of files. This diagnostic box does this job for the periods of time defined by the user, so I have the parameters stored in these 3 types of file with the date & time for each reading/sensing of the machine parameters.
I receive lots of files from each type periodically. Due to some requirements I have to perform a change in the structure of these files and that is: to read-in all the data from all files and store each parameter separately in one file specific for that parameter of course with its date & time for each reading/sensing.
So to say it simple for example in my conversion application I will open the type 1 file and read the first line which gives me a date & time value and 6 parameters value then I put each parameter value and its date & time value in one file. And so on for the 2nd type and 3rd type. (I have to add that the parameters for different date & time are stored line by line and delimited by 'tab' character so I can distinguish between them easily.
I have implemented this conversion app and I have done it in a sequential way or better to say synchronous mode of File/IO. Meaning reading files one by one and while reading one line writing to 6 or 8 or 2 (depending on file types) different files. I have to add its also simple for me to differentiate between different file types because same file types are named with the same pattern. (e.g. 1-6_000000.txt, 7-13_000000.txt and 14-15_000000.txt)
But it takes a lot of time when I have to perform this conversion for large number of files that I receive.
I want to know how I can improve performance using asynchronous File/IO in VB.NET or C#. On my own I have tried to make use of asynchronous File/IO operations provided by .Netframework but I think still I cant figure it out correctly how to do it to get a performance hit in my specific case.
Plz help me in this regard.
Thanks
|
|
|
|
|
I just finished an app that converts 'reading' data from remote sensors. So I can help but I need to clear up somethings.
1: Data is kept in 3 files
2: You open and read one line from the first file out of the set '1-6_.txt'
3: You are taking each para ie '1' & writting it to a file only for paras '1'
If these are the steps, this will not be very hard to optimize.
Let me know if I have the right idea.
Jason
Sometimes simply is better than fancy. The developer stated after typing code line 10 billion!!!
|
|
|
|
|
Yes Jason,
I think you get it right these are the steps for the first type of files, and I have to repeat the step 3 (as in your writing) for all the 6 paras
I would like to rewrite the steps which you wrote as the following to clear a bit more what is needed to be optimized:
1: Data is kept in 3 types of files. (I have to deal with 100s of each type in one conversion task. So lots of them should be read and lots of write operations should be performed)
2: I open first file of first type (i.e. 1-6_00000.txt) and read one line from it
3: From the read in step 2 I get 6 para and a common data/time value (which is the same for all paras in one line) and store these values in 6 different files each for one para.
4: Continue to read till end of the open file and repeat step 3 for it.
5: Take the next file of the same type and repeat 2,3 and 4 for it.
6: Repeat step 2,3,4 and 5 for the other two types of files.
Note that for type 2 (i.e. 7-14_.txt) in 3rd step I would get 8 paras and for type 3 (i.e. 15-16_.txt) in 3rd step I would get only 2 paras
So one can open one file from each type at the same time (when its possible using BackgroundWorker but I dont know exactly how? - ) and I mean the write opreations are not dependent.
Thanks
Regards
|
|
|
|
|
Well don't worry I can help, in refernce to the app I have just completed -it works with data readings taken every 15 minutes all year long. So the data files I have been dealing with have close to 100,000 lines of data and each line contains 8 or 16 different set of 15 minute data. I am converting them to database.
So the problem of yours at hand can be solved. Its almost 5pm here so tomorrow I will reply with what I think might be useful for you.
Thanks,
Jason
Sometimes simply is better than fancy. The developer stated after typing code line 10 billion!!!
|
|
|
|
|
I will be waiting till then...
Regards
Mohsen
|
|
|
|
|
Hello Jason,
I wanted to just ask you, when you can give me your suggestion; coz I am waiting for it very much.
Thanks
Mohsen
|
|
|
|
|
A few questions:
Have you developed a multithreaed app before?
Why don't you save the data to a database instead of six different files?
Does this app run only when you start it or do you want it to run quitly in the background waiting for new data files?
Jason
Sometimes simply is better than fancy. The developer stated after typing code line 10 billion!!!
|
|
|
|
|
Answer-1) I am currently doing some multithreading but not so good in it..
Answer-2) Why I am not saving the data to database?? its just the requirement which is set by customer or better to say set by the organization for which I am doing this app. I have also proposed to use a database instead but they want it in this way for now.
Answer-3) No the app will run whenever the user wants to convert banch of files by clicking a button.
Mohsen
|
|
|
|
|
Hello Jason,
Can you please finally give ur sugesstion to me
Mohsen
|
|
|
|
|
I want to capture keyboard entry in a DataGridView like I would do with TextBox.KeyUp, is there a way to do this ? I want to capture each key, not just the changing of value.
|
|
|
|
|
Youw should handle the DataGridView.EdittingControl.KeyUp event in your code.
Regards
|
|
|
|
|
I wanna add rows to a datagrid in the datagrid itself by inserting data in the cells and pressing the tag button.
Do you know what property in the designer should I mess with to enable me to add new row cells at runtime?
thanks
Naji
|
|
|
|
|
Hi:
yourdatagrid[r,c]=youtext
or you can operate the datatable
|
|
|
|
|
datatable would work.
Do you know how to bind an arraylist to a datatable?
thanks
Naji
|
|
|
|
|
Hi All,
I'm having the worst time trying to bind data to a IBindableComponent. I can bind things fine to a Data Grid View using:
IBindableComponent.DataBindings.Add("DataSource", IList, "MyTable")
But when I do the same thing where the IBindableComponent is a ComboBox:
this._bindableControl.DataBindings.Add( "DataSource", _bindingSource, "Value", true );
It adds it to the combo box's data bindings but does not bind it to the "DataSource" property. Very frustrating. I should note that unless I put in the "true" for "Formatting enabled", it throws an exception saying that the data source needs to be of type "IList" or "IListSource", but guess what, it is!
The "_bindingSource" is a class which implements "IListSource" and returns a "BindingList" of "ItemList" objects. The "Value" data member property that I'm supplying is the "Value" property of the "ItemList" object. This seems like the right approach to me, especially considering the end use of this will be for application developers who need to supply special formatting to what needs to be displayed in the combo box. I've tried using a BindingSource, and basically every other combination I can think of. I don't want to have to implement IList either, that would be extremely messy and unnecessary, in my opinion.
I really want to try and use the interface for this and not cast the object to what it really is. When I do that, it does work, but I want to avoid it at all costs.
Thanks in advance for any help anyone is able to provide. I would really appreciate solving this problem.
Eric
|
|
|
|
|
Don't cross post, you already asked this question in the Soapbox
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
I am just learning C# so please be patient.
I am trying to set up a splash screen that will last for a given amount of time and close itself, but I can't seem to find any references to such an operation (or more likely just can't understand what I have found...)
I have the splash screen set up, it closes when clicked. I just need something that will close the form after X number of seconds.
Thanks in advance!
David Wilkes
|
|
|
|
|
i just get this problem i instead of going it traditionally i tried this (you can say it hack)
in main thread i run a form build for this purpose named frmWelcome
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Screens.frmWelcome());
Application.Run(new Screens.frmMain());
}
then i set a timer in frmWelcome set its time interval equal to the time i want to show it and on its tick event i just write
this.Close();
it is good to be important but it is more important to be good
|
|
|
|
|
amatbrewer wrote: I just need something that will close the form after X number of seconds.
1- Go to the designer mode.
2- In your toolbox, drag a Timer control and drop it in your form -looks like a small clock-.
3- Single click on the Timer control in the panel below your form.
4- In the PropertyGrid set the Interval property to the number of milliseconds you wish -ie. X * 1000-.
5- Double click on the Timer control in the panel below your form.
6- Write the following code in the event handler:
this.Close();
Regards
|
|
|
|
|
Thank You!
This is exactly what I was looking for.
David Wilkes
|
|
|
|