|
I was only formatting odd cells, didn't notice until your post that he wanted rows
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi.
I am using web application in which I have to fill some textboxes with data(text). In most cases textboxes are filled with same data. Filling these textboxes is taking a lot of time so I want to reduce it. But how? I do not have access to source code of web application.
I want do develop WinForms application which after hot key event will fill for example 1st textbox with 'aaa', 2nd textbox with 'bbb', 3rd textbox with 'ccc' etc.
How can I do it in C# WinForms? How can I access textboxes of web application which have to be filled and change its data?
Generally, when I will press Button on my WinForms application, textboxes on web application must be filled with some data.
best regards
|
|
|
|
|
You might do this either using
SendKeys.Send
or
you might use webBrowser.Document.GetElementById , and fill the innerhtml.
|
|
|
|
|
I am using web browser (IE, Firefox) to work with web application. I am not sure, but WebBrowser component is used to view web pages on WinForms application, so this is not what I expected. Or maybe it must be written in WinAPI?
|
|
|
|
|
use of SendKeys.SendWait method completely solved my problem.
Thank a lot Abhishek Sur
|
|
|
|
|
I need to warn you. Some anti virus software's can detect your application as trojan or Key logger
|
|
|
|
|
mpiotrek wrote: Thank a lot Abhishek Sur Smile
Most welcome..
|
|
|
|
|
Dear frineds.
have some clarification.
is it possible to Get the "File Extension" By Using "Mime Type"?
won't there be Two extensions haveing same "mime type"
By
Joe
|
|
|
|
|
It is not possible.
You can go the other way, from extension to mime type if you write an appropriate mapping function.
Example of a failing mime type would be text/plain which maps to .txt, .com, .conf, .cxx, .def and others. In addition many people incorrectly tag mime types and so you may get .xml, .csv, .rss and who knows what returned as text/plain!
A good list of mime types can be found at http://www.webmaster-toolkit.com/mime-types.shtml[^]
|
|
|
|
|
thanks for the replay..
and for the Exact answer
is there a way to find the "Native Application" for the "mime type"?
By
joe
|
|
|
|
|
Hi,
I am currently trying a sample on windows azure. Some where I heard that using windows azure. we can develop some mobile applications which runs plat form independently.
Can any one know about this or any samples related to this please send me..
Thanx in Advance..................
sampath-padamatinti
|
|
|
|
|
sampath-padamatinti wrote: any samples related to this please send me..
Here is one article from Codeproject
HelloAzure[^]
This may help
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Thanks for reply,
It is useful for me......
sampath-padamatinti
|
|
|
|
|
Hi
I need somebody help.
In my c# project i need primary key of the row that i insert into my table;
what should i do?
If it is necessary to write storedprocedure , how can i use it in my project?
|
|
|
|
|
Use a statment like this:
string szStatement = "SET NOCOUNT ON; INSERT INTO tablename (column_1, column_2, ..., column_n) VALUES(?,?, ..., ?); SELECT @@IDENTITY AS ID;";
someDatabaseCommand = new SomeDatabaseCommand(dbConnection, szStatement);
int nNewId = (int)someDatabaseCommand.ExecuteScalar();
Greetings
Covean
|
|
|
|
|
I use GUIDs as primary keys. When I need the key of a row I'm about to insert I create the GUID in the application with System.Guid.NewGuid() and then pass it in with the rest of the data.
I never use autoincrement fields; they're so last century.
|
|
|
|
|
Thanks alot.
Can you explain me that what is GUIDs?
How can i use it?
should i create it c# code?
|
|
|
|
|
farokhian wrote: Can you explain me that what is GUIDs?
Globally Unique Identifier[^]
farokhian wrote: should i create it c# code?
All you will need is to call Managed Call to create GUID
farokhian wrote: How can i use it?
Guid.NewGUID().ToString()
Al thou I Don't recommend this approach for database. The process is very slow, and there you can get duplicates GUIDs.
I Recommend using Integer ID, With Auto_Increment options. When inserting Row, in SQL command do not specify column ID and value. It will grammatically give free ID number
|
|
|
|
|
GUIDs a string values used for uniqueness (example: 33b61dbd-2640-4153-8556-9cb9ad3e4a71). They are great for ensuring a unique identifier but not so great for indexing as they are string and thus cause the DB to have to do a table scan in order sort the records properly. Indentity or auto-increment field types may be old-school but they have the advantage of not needing to scan the table for ordering and thus provide much better performance for indexing. This is important because the Primary Key is an Index, the primary index in fact. The main advantage a GUID provides is with database farms. A record with a GUID will always have the same GUID but the Indentity could get reset across servers if precausons are not taken.
All that being said, I feel your original question was not answered. In order to answer your question though I would need a little bit more info as the answer could differ. How are you connecting to the DB? ADO.Net? Linq? What kind of database are you connecting to? Aceess? SQL? MySQL?
Thank you,
Eric Ritzie
|
|
|
|
|
I want use method in dll using with reflection.
-----------------------------------------------------------
Assembly assembly = Assembly.Load("abc.dll");
object obj = assembly.CreateInstance("Namespace.MyClass");
Type type = assembly.GetType("Namespace.MyClass");
string parameter = "5|2";
object[] param = GetParameters(parameters);
MethodInfo method = type.GetMethod("Sum");
return method.Invoke(obj, param);
-----------------------------------------------------------
Actually this values gets from database in varchar type. Which is string parameter = "5|2".
I use following code in "GetParameters" method for split values;
private static object[] GetParameters(string pParameters)
{
string removeSplitCharacter = pParameters.Replace("|", "");
object[] param = new object[removeSplitCharacter.Length];
int index = 0;
foreach (object item in pParameters.Split('|'))
{
param.SetValue(item, index);
index++;
}
return param;
}
-----------------------------------------------------------
Namespace.MyClass.Sum metod contain following code;
public int Sum(int a, int b)
{
return a + b;
}
I get error; can not convert System.String to System.Int32
If I write "object[] mParam = new object[] { 5, 10 };" instead of parsing parameter value from db program works.
What can I do? Thanks...
|
|
|
|
|
Instead of
param.SetValue(item, index);
use
param.SetValue(Convert.ToInt32(item), index); .
There's nothing left in my right brain and nothing right in my left brain. |
|
|
|
|
|
Its true but I dont know parameter types. In this example all values are int, "8|5". But may be another parameter like "true|false", or "John|Marry"...
|
|
|
|
|
But then you wont be "adding" true and false (by using the same sum method). Even if you are, you would not add them numerically, right?
It will be a boolean "and" or a string "concatenation".
Are there other overloaded versions of SUM available in the class that you invoke?
If you try to pass a string into a method which uses ints as parameters, you will definitely get the conversion error.
There's nothing left in my right brain and nothing right in my left brain. |
modified on Friday, December 11, 2009 4:40 AM
|
|
|
|
|
I use different dll use for different parameter.
My database table contain varbinary dll and varchar parameter each row.
I want use necessary dll with this dll parameter.
|
|
|
|
|
All I can think of then is that you fetch the parameter from the database and check its type. You then load the assembly you want to use for that type (if it is not already loaded!).
Then go ahead and call the appropriate method.
There's nothing left in my right brain and nothing right in my left brain. |
|
|
|
|