|
FoxholeWilly wrote: back button goes no further than the current process's first page
The back button history is persistent across processes? Can someone confirm this? It sure doesn't work that way in IE or Firefox browser desktop instances.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
You assume too much with the word "process." I am using it in its generic form. I have a webbrowser, a user pushes a button, and it displays some content, then does something completely different, then pushes a button, and other content is displayed in the webbrowser. I would like to clear the navigation history so that when the user pushes "back" he does not go beyond the initial page from the second time the webbrowser was used.
|
|
|
|
|
FoxholeWilly wrote: You assume too much with the word "process."
Yeah sorry about that.
I got your original reply by email. I can understand how you thought that.
I have used WebBrowser in applications where I create new instances of it during the lifetime of the application (process). I thought you were meaning that and the history was still present across the different instances. I was interested since it would effect the behavior of my applications.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Sorry about the original reply, it was one of those stupid and impulsive messages that one regrets the moment the "Post" key is pushed.
I figured I would have to just dispose and recreate the webbrowser control each time, but was hoping there was a simple yet illusive command that would clear the history, something like WebBrowser.ClearHistory() (hint, hint, Microsoft)
|
|
|
|
|
in your html page put the following
history.forward
this vil work good
regards
kalyan
|
|
|
|
|
I'm trying to get javascript to work from within a js file which is embedded into a custom control. I am able to get embedded style sheets and images in the same control to work fine. I have used reflector to verify that the .js file is there and has the correct path. I have tried three methods of referencing the js file in my OnPreRender method. I have used RegisterClientScriptInclude in conjunction with GetWebResourceUrl. I have used RegisterClientScriptResource. I have tried just setting up a LiteralControl with the script reference and adding it to the header, using GetWebResourceUrl to get the URL. In all these cases, the script tag is rendered on the page with a url that looks like this:
<script src="/control_test/WebResource.axd?d=kN16ZCatkm1MQ5JqEow-rFnxOlL1FcRrnlZIuw4pdq5WQtMe1QPxJ5N0g5Bj_QiVljlpuyQ3oGq1EsHpF2JdEw2&t=632826839637949892" type="text/javascript"></script>
but when I try to call a function from the file, I get an 'object expected' error. If I put http://localhost plus the url listed in the script tag into my browser, it returns a file called WebResource.axd which has the contents of the javascript file. It seems like if that is happening, then the browser should have access to the file. Could this be some type of mime type problem? I have the mime type in my AssemblyInfo.cs as text/javascript.
Jason
|
|
|
|
|
Nevermind. The javascript is actually loading, it's some other problem.
|
|
|
|
|
Hi, i wanna allocate memory for some data but i dont know how.
With C it loks like
struct MyStruct
{
int number;
string Name;
struct *Next;
}
But i dont know how do that in C#
so could some one help me.
??
thx
|
|
|
|
|
In C# you don't allocate blocks of memory directly. The common language runtime that runs your code handles memory allocation and memory cleanup automatically for you. So instead of malloc, you allocate objects using the new keyword.
MyFoo obj = new MyFoo();
If you're absolutely certain that you need to allocate a block of memory (the only real scenario for this would be interoping with native code), then you can use System.Runtime.InteropServices.Marshal.AllocHGlobal or some of the other interop classes inside the InteropServices namespace.
Does that answer your question?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
but how can i point to the next instance of myFoo.
So if i have to creat 3 data.
i explain, the pointer first points to the beginning of my struct
so i wanna write some think like
first->Next=Second; and so on Seond->Next=Third.
So!!
-- modified at 12:49 Monday 8th May, 2006
|
|
|
|
|
Oh, so you're trying to do a linked list. I see.
You can do that like so:
class MyClass
{
public MyClass Next;
}
MyClass instance1 = new MyClass();
instance1.Next = new MyClass();
instance1.Next.Next = new MyClass();
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
|
ok i ll; try to do it
but one other rquestion,
how cans i store the other data which are int Numer and string name;
does it look like
class Myclass
{
int number;
string name;
public Myclass Next;
}
|
|
|
|
|
torNAdE wrote:
does it look like
class Myclass
{
int number;
string name;
public Myclass Next;
}
Yes.
As a general recommendation, class fields should be private. If you need to access them outside of the class, use a property:
class MyClass
{
private int number;
public int TheNumber
{
get
{
return number;
}
}
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
thank you verry much.
it was helpfull
|
|
|
|
|
I have solution with almost 100 projects. I have one startup project. Everytime if there is any changes in one of the projects i am pressing F5 to build all the projects, which is taking about 30-40 mins. And i don't have provision to uncheck the Build check box in configuration manager of solution, its locked.
Is there any way i can test and debug just the changes made. I tried Attach to process. From bin folder i executed the exe of startup project and try to attach one of the changed projects from solution (which is other than start-up), sometimes it is attaching and sometimes not. Even if it attaches i am unable to debug the changes made.
I am using Framework 1.1
Any help, Very urgent
Thanks
Santosh
|
|
|
|
|
I believe Visual Studio will rebuild any projects that have dependencies on the project you've just modified. So if you modify A, yet B and C depend on A, B and C will be rebuilt as well.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Thats what, i don't want any dependent projects to re-built as almost 50% of the projects are dependent on which i have changed. (help really urgent)
santosh
|
|
|
|
|
But then you're running dirty code: if projects B and C depend on A, and A has been changed, then B and C have to be rebuilt otherwise they could be referecing functions, properties, and variables in A that no longer exist or may have changed.
I recommend asking this question in the Visual Studio forum or in the MSDN Visual Studio forum for a better answer though; I'm not sure if you can tell VS to not rebuild a project even if it is dependent on a modified project.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Try enabling incremental compilation in each and every project (all 100 )
|
|
|
|
|
My app creates a data array that quite happily serializes to disk from a control. If I run another part of the app that generates a data array (I'm assuming correctly as I have no evidence that its not) from a MainForm toolbar, and try to serialize (using Stream and BinaryFormatter) from the same control above, I get an exception that complains that the MainForm (derived from Form) is not marked as Serializable. Changing it to Serializable does not help, and it feels like a band-aid fix anyway.
I believe this message is a symptom of the problem, which I suspect is a section of one of my classes that should have the [NonSerialized] attribute. I have not been able to locate this as yet.
Can anyone offer suggestions what what would cause this?
Stewart DIBBS
|
|
|
|
|
Do you need to serialize your main form? If not, don't serialize it. Whatever object you're trying to serialize, make sure it doesn't contain a reference to the main form, otherwise it will try to serialize it. If it is referencing the main form for a good reason, then add the NonSerializedAttribute to it.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
OK, I see my problem: the serializable class exports an event. The first pass through does not subscribe to the event and serialization works OK, but the second pass does subscribe to the event and the handler is in the mainform code. Hence the seriealization exception I get.
So I have to move the event out of the serialization class. Wasn't happy with the code anyway.
Stewart DIBBS
|
|
|
|
|
I am using MethodInfo.Invoke() to invoke a method that has a ref keyword on a value type in it's parameter list. Example:
MyMethod(int p1, ref int p2)
However there does not seem to be a way to to tell invoke to pass parameter 2 by reference.
I tried to use ParameterModifier. But it has work just with COM interop.
Please help, I am getting an error because it is trying to pass by value instead of pass by reference.
King Regards,
XironiX
[ _ Always there is another way _ ]
-- modified at 11:48 Monday 8th May, 2006
|
|
|
|
|
int param1 = 5;
int param2 = 10;
object[] arguments = { param1, param2 };
theMethod.Invoke(arguments);
param2 = (int)arguments[1];
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|