|
|
From your description, it sounds like the reason your code doesn't work as expected is because the loop is running on the server and is thus starting over each time. I have two that you could try, both are client-side javascript:
Window.setTimeout(code, delay) - A string of script to execute after millisecods delay has expired. You could call a function that keeps track of which page to display next. setTimeout fires only once, so your function will have to reregister call setTimeout() as well.
Window.setInterval(code, interval)
Window.setInterval(func, interval, args...) - Similiar to setTimeout, but repeats perpetually. The second overload may be the most appropriate for your problem.
HTH
|
|
|
|
|
i am using c# and its a desktop application, no server side things in it.
ASIM
Asim
|
|
|
|
|
Remember that Thread.Sleep() takes time in milliseconds. This executes on the current thread, so there's no reason that Thread.Sleep(30000) shouldn't sleep for 30 seconds.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
|
As I said, the loop is flying through in mere milliseconds. You must put Thread.Sleep(30000) (30 seconds here, for example) after you navigate. For one, navigate is a non-blocking call so each iteration doesn't wait for the next to finish. Second, even if it was a blocking call, you still wouldn't have enough time to read the page. How is this hard to understand?
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
ok sir,
so would it work in your opinion?
ASIM
Asim
|
|
|
|
|
Yes, it'll work. It's supposed to work. If it didn't, there were be many things wrong with your entire system. Read the documentation for Thread.Sleep . The call will block for the specified time, giving the WebBrowser control enough time to load the page and you to read it, and then the method will return and the next iteration will continue. This is a simple problem.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
hello,
i wan to change date, after getting from database (string or date) to format shown below:
2003-07-11 16:52:00.000
whereas its showing like this. 24/10-2003 ... pm/am
have tried all the methods in system.datetime class.
but nothing like this.
CAN SOMEONE GUIDE ME ON THIS.
i have use datetime picker as well but nothing uptll now.
WAITING
ASIM
Asim
|
|
|
|
|
|
How is it possible to use a combo box, that has two values, Yes and No, and depending on which one a user selects, must equal 0 or 1.
To add to this, the combo box is bound to a dataTable where the values it receives are either 0 or 1.
I cannot seem to work this out. I saw the Addrange method, and thought that might be what I want, but MSDN has very little in the way of usefull information on this. Please help me.
|
|
|
|
|
Well if you getting the information from a database then you could simply add the strings "No" and "Yes" to the comobobox and then use the selected index property to select the correct string. For example if you're reading in the data from the database and the value you get is 0 then that would set the comobobox to index 0 (or the string "No")
- monrobot13
|
|
|
|
|
Sorry, I dont want to sound stupid, but I am, as I dont really understand how thats done. I can understand setting the selected index, but how would you tell the control to use Yes and No, and to bind those respective values to 1 and 0.
|
|
|
|
|
You simply do
this.comboBox1.Items.AddRange(new string[] {"No", "Yes"});
Now No has an index of 0, and Yes has an index of 1. When you read the data, simply
this.comboBox1.SelectedIndex = (int)myDataRow["MyBooleanColumn"];
bool value = (bool)this.comboBox1.SelectedIndex;
There is no binding in this situation.
To actually data-bind this, you're going to have to set ComboBox.ValueMember to the column in your data source or use the BindingContext to do such manually.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
My subject pretty much sums it up...how do you do it? How can you read and write to an MS Access table without using a DataSet object in your C# program. I have my reasons for not wanting to use one, and I would be happy to give them if anyone wants to know. But I really would like to know how to do this, if it is possible. Thanks.
|
|
|
|
|
WhatupE wrote:
I have my reasons for not wanting to use one, and I would be happy to give them if anyone wants to know. But I really would like to know how to do this, if it is possible.
Why exactly?
-Nick Parker
|
|
|
|
|
um, alright. because a DataSet kills your memory. If you have 7000+ records, possibly with pictures, there is no way a normal system can hold it. now, can anyone tell me how i can read/write to a MS database w/o using a DataSet. Thanks.
|
|
|
|
|
WhatupE wrote:
um, alright. because a DataSet kills your memory.
Not exactly.
WhatupE wrote:
If you have 7000+ records, possibly with pictures, there is no way a normal system can hold it.
I think you might want to consider refactoring your solution.
-Nick Parker
|
|
|
|
|
Look into Command and DataReader. It is a forward only reader. You can use standard SQL staements to update records via the Command.
Rocky Moore <><
|
|
|
|
|
I create a script to upload data into local server from other remote server.
Follow is my step.
1) step ,I link server
USE master
GO
EXEC sp_addlinkedserver
'MyOtherServer',
'',
'SQLOLEDB',
NULL,
'cebas',
'DRIVER={SQL Server};SERVER=MyOtherServer;UID=cdc;PWD=cdc;'
GO
2)step I get data from MyTable
select * from [MyOtherServer].[MyDatabase]..MyTable
Result:
Server Msg disp "Login failed for user 'sa' when I exec .
|
|
|
|
|
You might take a look at sp_addlinkedsrvlogin.
Rocky Moore <><
|
|
|
|
|
hi there!,
how can i change the focus so the input goes just to the panel.
for example in my program when i press enter or space one of the buttons on the toolbar works "cose in my program i use left and right keys and then enter!"
my input goes to mainform and not to panel wich on mainform
is there anyway just to disable input to toolBar.
i think its hard to understand my question
good luck.
|
|
|
|
|
i couldnt follow most of your question, but maybe this will help..
you should set focus to the control (textbox, etc.) that you want to have the initial focus..
create an OnLoad() handler for your mainform, and after the panel is displayed call:
this.myPanel.Focus();
or in your OnLoad() of the panel call
this.myTextBox.Focus();
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
MSDN help says you can use a UNC path for any methods
that accept a path, and I'm wondering if I can also
substitute an IP address for the UNC....???
Example:
Using System.IO.File.Move()
File.Move("\\\\MyServer\\share\\dir\\myfile.txt",
"\\\\YourServer\\share\\dir\\myfile.txt");
Should I also be able to use IP address like this?:
File.Move("http://192.168.1.1\\share\\dir\\myfile.txt",
"http://192.166.1.3\\share\\dir\\myfile.txt");
thanks for your input...
vince
|
|
|
|
|
On the network you shouldn't have to include the "http://" portion, but you can use the IP address of the server, usually.
-Nick Parker
|
|
|
|