|
How can I detect when a user has selected a different row to the current row?
I want to enable/disable toolbar 'Next' 'Previous' buttons in toolstrip based on selection location within grid.
|
|
|
|
|
SelectionChanged event by any chance?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Ashfield wrote: SelectionChanged event by any chance?
I was going to suggest video surveillance but I think your solution is better.
led mike
|
|
|
|
|
led mike wrote: video surveillance
I think its neater, but its been a long day....
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I have one Master page in master page i have create menu using link button and i have apply Same Css on All.
And I have 5 content page.
I want when my content page one is load Then Change CSS of specify link button.
I Try This Code But this Code not Working properly.
protected void Page_Load(object sender, EventArgs e)
{
MasterPage pharmacyMaster = (Pharmacy_ICaremaster)this.Master ;
LinkButton mastrlbtnCategory = pharmacyMaster.FindControl("lbtnCategory") as LinkButton;
mastrlbtnCategory.CssClass = "cssAMainLink:visited";
}
how Can I Do It.
Reply urgently .
thanks in Advance.
Ishtiaque Hussain Jalbani.
|
|
|
|
|
how about asking this in ASP.NET Forum ...
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Head off to the ASP.NET forum.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I am trying to control a service remotely, by impersonating (basically using this technique: http://www.codeproject.com/KB/dotnet/UserImpersonationInNET.aspx[^]) an administrator of the remote computer and using the ServiceController classes.
The problem is that i can't start or stop the services, I can however enumerate them fine. If i add my local account as an administrator on the remote computer, and turn off impersonation I can start and stop.
Any idea why? Does impersonation not do the job?
plz halp
betonglasermur.FeedDwarf(pur_is, 17);
ProcessStartupInfo.AintNotCreateNoWindow = (false && !true) != (true || false) ? false == true ? true : false : (true != false && false);
Morgonen är tröttmans mecka
|
|
|
|
|
Hello everyone,
I have a very simple data structure representing a book, including ID/title/author/price, no more big field, all are strings. My application provides simple interface to query book information by book ID.
1.
And I want to store book information into Dictionary, book ID as key and other data as value. My question is are there any best practices about the size of a Dictionary should be? The total data is very big (a couple of G bytes monitored from physical serialized file), and I am not sure whether I should divide the data into several Dictionary or just use one?
2.
Does Dictionary use page file to swap storage (e.g. Dictionary could be able to store more information than physical memory limitation of current computer if it could use swap page file) or just use pure memory?
thanks in advance,
George
|
|
|
|
|
Hi George,
I haven't used any memory-based data structure larger than my system's physical
memory, and I don't plan to do so any time soon: the data structure would be
loaded into (virtual) memory and immediately swapped out to the page file on
disk again, yielding bad system performance.
Whenever you need large amounts of data, and certainly if you are using
only small parts of it at a time, use a database. SQLServer Express is freely
available, and SQL queries can be organized in all popular .NET languages.
BTW: A dictionary is no different from any other data structure as far as memory
behavior goes; data structures don't decide themselves on whether they get
swapped out. It is the memory manager that decides on these mathers,
irrespective of the structures or classes involved.
|
|
|
|
|
Hi Luc,
To tell the truth, my SQL is very bad and I just want to skip to learn it.
So, your point is Dictionary could use page swap file and could contain more data than physical memory?
regards,
George
|
|
|
|
|
Hi George,
George_George wrote: Dictionary could use page swap file and could contain more data than physical memory?
technically yes (and so could a byte array, or anything else).
and practically no, you will probably not be satisfied by the performance
of your app.
|
|
|
|
|
Thanks Luc,
You mean even if page file enables us to use larger memory than physical memory limitation, the access is slow?
regards,
George
|
|
|
|
|
Hi George,
I assume your data is on disk somehow. So populating a data structure
(Dictionary or anything else) first will read the data from disk; since
this overflows the physical memory, it will spill over to the page file(s),
so performance will resemble a huge file copy before anything useful will
be possible.
If you could skip the "load all data first" step, you would not incur
this penalty. The easiest way to do this, is by using a database.
The database code is smart enough to cache data, and uses available
memory in an optimal way.
Also, when the application is very simple (so you could do without
a database), then the required SQL will also be very simple. Maybe
you just need a single table, and a single SELECT line, as in
SELECT * FROM books where books.ISBN = '1234-5678-1234'
|
|
|
|
|
Keep in mind that a database will use SEVERAL TIMES as much memory as your raw data, due to overhead (indexing etc...). A hash table will give faster retrievals and allow you to store more data in memory.
|
|
|
|
|
Thanks Alan!
Any ideas to my question below?
--------------------
And I want to store book information into Dictionary, book ID as key and other data as value. My question is are there any best practices about the size of a Dictionary should be? The total data is very big (a couple of G bytes monitored from physical serialized file), and I am not sure whether I should divide the data into several Dictionary or just use one?
--------------------
regards,
George
|
|
|
|
|
Thanks Luc,
I am considering using SQL solution seriously. And I am also interested to do benchmark.
One more question, in my scenario is it better store all data inside one Dictionary instance or split into a couple Dictionary instances (e.g. Dictionary instance to store book name starts with letter A, instance with letter B, etc.)? Any best practices about the size of Dictionary which should not exceeds?
regards,
George
|
|
|
|
|
Hi George,
splitting a homogeneous set of data items over multiple collections
(as in 26 collections, one for each initial letter value)
will typically not help you at all:
- it will require more code,
- it will not result in more compact data,
- the only thing it would achieve is a better "locality of data" which at
best is a second-order effect, and as far as I can see is irrelevant here.
So I suggest you go for a database with one huge table, or if you don't
want a DB, a single huge Dictionary. I personnally would go with SQLServer
Express as I said before. As others have said, a DB is performance-optimized;
furthermore the application seems very simple, so any DB could do, hence
pick a popular and cheap one: SQLServer Express, unless your needs exceeds
one of its limitations: 8GB of data (not sure), and maybe a limited number
of concurrent users (not sure at all).
|
|
|
|
|
George_George wrote: To tell the truth, my SQL is very bad and I just want to skip to learn it.
Use db4o[^]
|
|
|
|
|
Hi Giorgi,
I read the introcution for db4o and it is just a database, I think SQL Server should be more superior than it. Why do you think db4o is more suitable for my solution?
regards,
George
|
|
|
|
|
|
Thanks Giorgi,
I understand basic ADO.Net, Store Procedure and T-SQL. I just do not know advanced SQL materials.
My question is, for just query in my scenario, for using object database compared with using relational database like SQL Server, which one is better? Why?
regards,
George
|
|
|
|
|
Well, I am not 100% sure. As I said when using object databases you don't need to map rows to classes but I am not sure about performance. Perhaps it depends on implementation of the object database. On the other hand, if you need to build system with many users accessing the same data I believe Sql server will handle it better though I haven't tested it myself.
Here is some comparison: http://en.wikipedia.org/wiki/ODBMS#Advantages_and_disadvantages[^]
|
|
|
|
|
Thanks Giorgi,
I will read it carefully. How do you think of using Dictionary v.s. using database in my scenario?
regards,
George
|
|
|
|
|
If the data is small you can use dictionary. In case of large amount of data I would use database. If you don't want each user to install sql server you can use 'portable databases' such as sql compact edition or sqlite.
|
|
|
|