|
thanks for reply
InnerText is not set, as I try to set the value it throws an exception.
How to fix, Can you explain with some code?
|
|
|
|
|
No it is not that InnerText is not set, it is that the Property "InnerText" for the object does not exists. You are using reflection to get the type of your htmlelement and it is possible that this type does not provide an InnerText-Property. There is nothing to fix, you only have to pay attention to this by using the code I provided before.
|
|
|
|
|
but the same code is running successfully on other PC.
Why not on this?
Now How to fix it finally,
Is there any other way, I can replace the innertext of an htmlelement
|
|
|
|
|
Do you use the same input (I guess a HTML-page) at every PC?
|
|
|
|
|
yes, the only difference is in the PC which has visualStudio, it is successfully sets the innerText Value of an HTMLElement.
I don't understand where I'm doing wrong?
|
|
|
|
|
Is it possible, that you could post a bit more of your code, e.g. the point where you get the elements from etc. Maybe this will guide us to the point of failure...
|
|
|
|
|
|
Hi Dears,
Kindly let me know the definition of NON-BLOCKING Socket. "in short"
Thank you in advance
(Riaz)
|
|
|
|
|
M Riaz Bashir wrote: Kindly let me know the definition of NON-BLOCKING Socket.
NON-BLOCKING Socket
|
|
|
|
|
Hi
I make any File in PC, and I transfer him to PPC (Windows mobile)
How I can get the Modified date of this file ?
I try this:
DateTime GG;
FileInfo H = new FileInfo(@"c:\License.txt");
GG = H.CreationTime;
GG = H.LastWriteTime;
GG = File.GetCreationTime(@"c:\License.txt");
GG = File.GetLastAccessTime(@"c:\License.txt");
GG = File.GetLastWriteTime(@"c:\License.txt");
but I always get the Today date and time
thank's in advance
|
|
|
|
|
Yes the output is correct!!
because you have transferred the file only today!!! so that is the latest write time!!!
Have a Happy Coding.....
|
|
|
|
|
thank's for the help
What I can do to see the real creation date of the file ?
|
|
|
|
|
That is quite difficult to do AFAIK!
You can try implement this logic with the corresponding code!
1.Before File Transfer operation to your mobile device
--------------> copy the present Created Time, LastWrite time and lastAccess time to a temporary variable!
2.Copy the File!
3.And reset the Created Time, LastWrite Time and LastAccess Time from your temporary variable! since these are properties, you can able to set them! i believe!!!
So if your copy function performs all this three steps, then you will always get the creation date of file as same as your computer!!!!
It may work!!!
Have a Happy Coding.....
|
|
|
|
|
Hay..
I hava a windows based c# application project.. which i hav to switch to Arabic when user select arabic option when login.....
help pls
|
|
|
|
|
|
pls, i need code that will generate numbers,from 1 to 40 per row without repeatition.
It must generate the numbers without repeating any number in a row and any row must not repeat it self in the table. so it will generate all possible numbers per rows,in such a way that if i write down numbers 1 to 40 numbers randomly without reapeting any number row, i must find it in the one i generate from the winform gui and C# code.And another button will be able to print preview the table.
[confused]
thanks for ur assistance.
OLUMADE DAMILARE
|
|
|
|
|
Winforms has nothing to do with it.
The way to get a sequence without repeats is, you fill a list with the numbers 1-40. Then you use a random number generator to pick a number out of that sequence. Then you remove thant number. So, the second time, you need a number between 0 and 38 ( because the sequence is 0 indexed ). So, every time you generate a result, you remove it from the possible result pool.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Ah, there you are, I figured you'd show up eventually.
See here[^].
However, if you want several unique sequences of the same values, you may need to go a step further.
Add:
As you're generating a sequence, make a base-40 string of it. Have a HashSet<string> to hold the sequences you've already generated. If the sequence is a duplicate, try again; if not, add it to the HashSet and return it.
You can generate a base-40 digit with "0123456789ABCDEFGHIJKLMNOPQRSTUVQXYZabcd" [ i ] and append it to a StringBuilder .
modified on Sunday, July 26, 2009 8:37 PM
|
|
|
|
|
Hello,
I want to get the unicode of some chars to send them to a cellphone
EX:
0628 represnt the char 'ب' in Arabic iwant to get this 0628 from this letter.
thanks
Dad
|
|
|
|
|
For each character in the string this displays:
The character
It's unicode character code in hex
It's unicode character code number
string text = "0 a+…"";
foreach (char c in text)
{
Console.WriteLine("{0} U+{1:x4} {2}", c, (int)c, (int)c);
}
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Chars already are in unicode
|
|
|
|
|
My Question,
I have designed FORM1 with a datagridview dgvForm1 and am populating data into it using LINQ queries. The data is populating fine into the dgvForm1.
I have a checkbox column in the dgvForm1 to select the checked rows.
I have a button in FORM1 called DISPLAY.
I have FORM2 with datagridview dgvForm2.
All I want to do is ...allow the user to select the required rows from dgvForm1 using checkboxs. After selecting, the user clicks on the DISPLAY which will show FORM2 . I want to display the selected rows from dgvForm1 in the datagridview(dgvForm2) of FORM2.
Am using C# with VS 2008 , this my code for reading the checked value of rows,,,, I have defined a constructor in Form2 to take in string values. Then in form2 initialization am assigning the string value to datagridview2 in form 2.. Am not sure if its correct to do so ..... but am not getting the required result.i.e my datagrid2 is not getting populate with the checked rows from datagrid1. please suggest solutions,,,thanks
string<br />
<br />
data = string.Empty;<br />
foreach (DataGridViewRow row in dataGridView1.Rows<br />
{<br />
if (row.Cells[SelectColumnIndex].Value != null &&<br />
Convert.ToBoolean(row.Cells[SelectColumnIndex].Value) == true)<br />
{<br />
foreach (DataGridViewCell cell in row.Cells)<br />
{<br />
if (cell.OwningColumn.Index != SelectColumnIndex)<br />
{<br />
data += (cell.Value + ","); <br />
}<br />
}<br />
data += "\n";<br />
}<br />
}<br />
Form2 fm = new Form2(data);<br />
fm.Show();<br />
<br />
}<br />
<br />
<br />
public Form2(String data) <br />
<br />
{<br />
<br />
InitializeComponent();<br />
<br />
this.dgv1Fm2.DataSource = data; <br />
<br />
<br />
<br />
<br />
<br />
}<br />
<br />
|
|
|
|
|
I would suggest an alternative strategy.
Instead of a string for your data member use a List<> .
Then for each selected row add the primary index value to the List<>.
Pass the data to Form2, in the constructor, as you do now and then load data into the dgv using a SELECT statement, passing in the items from the List<> as parameters for a WHERE clause.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Is there any easier way....to display selected data from form1 dgv using checkbox...and diaplay in dgv of form2
|
|
|
|
|
spankyleo123 wrote: Is there any easier way
Depends on what you call easy!
It also depends on what you want to do with the data in Form2. If it is read only then you could create a class (I'll refer to it as SelectedData ) that has fields for each of the columns of interest from your data, give it a Constructor that takes a DataGridViewRow and load the fields from the dgvRow in the Constructor .
You could then go through your dgv and for each selected row create an instance of SelectedData with the DataGridViewRow and add it to a List<selecteddata>.
Pass the filled List to Form2 and simply set dgvForm2.DataSource to the List<>.
If you need to edit the data in Form2, my previous suggestion, or a variation of it, would be preferable.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|