|
You're right of course, however I'm not going to suggest to cause continuous disk activity just to show a growing page of text in some Control.
|
|
|
|
|
You could use an AJAX-call using JavaScript. You'd still need to embed everything in a HTML-document, but that would be the way to get dynamic content on a page.
Start here[^].
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Take a look at the Document.InvokeScript method of your WebBrowser control. You can execute all the Java Script you want dynamically. Mix that with the ObjectForScripting method and you can handle call backs also.
I encapsulated google maps into Windows Forms using this method and it has been flawless.
|
|
|
|
|
Thanks all. I will try all suggested solutions and see if they will suit my work.
However, what may be another problem considering the suggestions is that the application is not aware of the text that will be inserted into the page. All text will be generated as the user is using and interacting with the application. I don't know how I can accomplish that.
|
|
|
|
|
Ok, I will go a step further. There is nothing in the DOM that you cannot alter dynamically with InvokeScript. If you can do it in HTML, you can do it with C#. Here is an example of changing a
<H id="myHeader"> element.
public void UpdateHeader(string data)
{
string cmd = "var x=document.getElementById(\"myHeader\"); x.innerHTML = \"{VAR}\";"
cmd = cmd.Replace("{VAR}", data);
object[] codeString = {cmd};
webBrowser1.Document.InvokeScript("eval", codeString);
}
|
|
|
|
|
Thanks Potter. In this case, should "eval" be a script that should exist on disk in the application folder? I checked the arguments to InvokeScript and the first argument is name of the script.
|
|
|
|
|
"eval" is used when you want to execute Java Script. It is already available in browsers that support Java Script. The commands that you build will be passed to the eval function as a parameter and executed.
eval(script);
|
|
|
|
|
Hi,
When I try to regsiter my dll (Class Library) with command (in batch file) :
call %VS90COMNTOOLS%\vsvars32.bat
regasm.exe MyDll.dll /unregister /tlb
regasm.exe MyDll.dll /codebase /tlb
pause
the strange that it generate also tlb files of DevExpress.
how solve this please ?
|
|
|
|
|
'System.ComponentModel.CancelEventArgs' does not contain a definition for 'FormattedValue' and no extension method 'FormattedValue' accepting a first argument of type 'System.ComponentModel.CancelEventArgs' could be found (are you missing a using directive or an assembly reference?)
|
|
|
|
|
Without the releveant code fragment, it's difficult to tell, but probably what you have done is tried to use a standard CancelEventArgs when you meant to use your own derived type, which includes FormattedValue as a property or method.
Either that or you didn't mean to use the EventArgs at all, but a DataGridViewCell reference instead...did you mistype "e" for "c" by any chance?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
ni i type it as e sir code is
private void dataGridView2_Validating(object sender, CancelEventArgs e)
{
if (String.IsNullOrEmpty(e.FormattedValue.ToString()))
{
MessageBox.Show("Cell not be empty. Please insert value.");
e.Cancel = true;
}
}
|
|
|
|
|
CancelEventArgs does not contain any information about your DataGridView, much less the cell.
You need to change your handler to refer to the appropriate dervived class: DataGridViewCellValidatingEventArgs for CellValidating for example.
See MSDN re the appropriate Validation event: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvalidating.aspx[^] for Cell validation, for example.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
It's not telling you porkies. FormattedValue is not a member of System.ComponentModel.CancelEventArgs . If you look here[^], you will see that the only property that is added is the Cancel property.
|
|
|
|
|
i am not understand ur language
|
|
|
|
|
It's not telling you porkies means that the message is telling you the truth. It's from something known as Cockney rhyming slang, where Pork Pies = Lies, and so porkies. And, as I said, FormattedValue doesn't exist in that class. I don't know how much plainer I can make it - it's your code that's wrong, not the compiler.
|
|
|
|
|
|
Univote countered.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
what..plz reply to query if u know answer
|
|
|
|
|
I already have...that was sent to Pete, not you!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
|
|
Hi,
Am using one dll in my application.
This dll contain one internal class which is used to show popup winform.
Am displaying this popup form.
This popup form contain 2 linkLabel, i want to set the visible property of this linkLabel as false, i cant directly access this control because of its protection level(Private) in Internal class in a assembly.
So could any one tell me how to do this.?
This is my code.
Assembly assembly = Assembly.Load("HS.Satis.Client");
Type myType = assembly.GetType("HS.Satis.Client.AuthenticationForm");
FieldInfo fieldInfo = myType.GetField("_changePasswordLinkLabel" ,BindingFlags.NonPublic | BindingFlags.Instance);
i can manage to get the field information which is available in internal class into fieldInfo variable, from here, how can i set the visible property of
_changePasswordLinkLabel as false using reflection.?
|
|
|
|
|
Rocky23 wrote: i can manage to get the field information which is available in internal class into fieldInfo variable, from here, how can i set the visible property of
..setting the field is done is a similar way as getting it's value. GetValue[^] has an example in the documentation, off course.
So, you ready to explain whom this "Satis" client is that you're going to hack to steal their clients passwords?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I know about setvalue, but before setting a value, i need to track the visible property of a field right.
but here i couldn't able to get the Visible property of a field _changePasswordLinkLabel
PropertyInfo propInfo = fieldInfo.GetType().GetProperty("Visible");
propInfo.SetValue(myPropertyInfo, false, null);
I tried something like above, but propInfo is returning Null, dont know how to get the visible property of a field using reflection, am stuck here.
Could you pls tell me how to get the Visible properties of a field
_changePasswordLinkLabel
Ans Satis is an assembly name am using in my application and its full name is like this "******.*******.satis.client.dll"
and we can use this assembly only in our internal projects, so didnt displayed the complete name of the assembly here.
|
|
|
|
|
Rocky23 wrote: Could you pls tell me how to get the Visible properties of a field
..simple, you enumerate all properties. If you find one called "Visible", you got the right one.
Make sure you're actually reading from readable properties, and write to writeable properties. And no, I can't help without you showing the offending code. These are snippets that show a bit reflection and a bit of some dll you're trying to hack.
..which brings us to the next question; do you have the original authors' consent?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|