|
hi mike,
Thanks for your reply.
I have no. of image filenames in sql database.Using C#, I extracted that data and stored in arraylist.Now I want to store this arraylist object in javascript array.
Is it possible? If yes, please send me sample example.
Thanks
test
|
|
|
|
|
foreach (string name in mylist)
{
Page.RegisterArrayDeclaration("listname", name);
} This will emit the following:
var listname = new Array('a','b','c','d',....);
|
|
|
|
|
hi leppie,
Thanks for your reply.
C# code:
ArrayList c_list = new ArrayList();
c_list.Add("d");
c_list.Add("e");
c_list.Add("f");
Javascript code:
var js_list = new Array('a','b','c');
Now I want to know how to transfer arraylist values from C# to javascript(i.e., c_list -> js_list)
Source -> Destination
C# -> javascript
Please help me to sort out this problem
Thanks
|
|
|
|
|
tjpraveen23 wrote: Javascript code:
var js_list = new Array('a','b','c');
you dont have to declare that. reread my post and try it out.
|
|
|
|
|
Hi! I need code of snakes and ladders game in visual C.Net..plz if any one can help me in this game. Plz if u have the compied and debugged code of this game ..kindly send it to me on the following ID
"spoiledpunk143@gmail.com"
If there r any kinda errors in it..even then its Ok ..i'll try to debug them..but kindly send the game code.
wasif naeem
|
|
|
|
|
Why don't you try and write the game youself? If you run in to problems then we can help you.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
I have the following callback function which I am using to update a progress bar. The only problem is, when I change the value of the progress bar, the bar doesnt change It just shoots to 100 when it is done. I have tried using Application.DoEvents(); .
private Int32 CopyInProgress(uint TotalFileSize, uint BytesTransfered, uint StreamSize, uint StreamBytesTransfered, uint DwStreamNumber, long dwCallbackReason, long hSourceFile, long hDestinationFile, long lpData)
{
float t = TotalFileSize;
float bt = StreamSize;
int nPercent = (int)(bt/t)* 100;
percentComp.Text = nPercent.ToString() + "%";
progressBar.Value = nPercent;
Application.DoEvents();
return PROGRESS_CONTINUE;
}
Any ideas why this is happening?
Sean
|
|
|
|
|
Yup, I got an idea.
You are converting a float (bt/t) into an int...then multiplying it by 100.
By definition, when you make it an int in this manner the answer can only be 0 or 100 and nothing in between.
try changing it to:
int nPercent = (int)(bt/t*100);
|
|
|
|
|
Nicely spotted! I was trying to find a reason why the message couldn't have reached the control. Tuh!
Regards,
Rob Philpott.
|
|
|
|
|
Not a problem. Even a crusty old C programmer gets to get one right once in a while.
The rest of the time I'm generally walking around C# and .NET like a complete idiot because so many of the rules have been changed that there's not a lot of advantage to having programmed for 20+ years...LOL.
Score:
Cprogrammers = 1;
WhizKids = INT_MAX;
|
|
|
|
|
Hey thanks a lot
Sean
|
|
|
|
|
i would like to get the text that is written in axwebbrowser in any textbox.or text area
that in the page downloaded..howa can i get it?
i try to use mshtml.HTMLDocumentEvents2_Event.onkeypress
but it doesnot work
|
|
|
|
|
Hello, I'm trying to view a webpage in a WebBrowser using DocumentStream.
The problem is about showing it. If I put the AllowBrowsing in TRUE, I can't see the page, only I see a blank page. If I put the AllowBrowsing in FALSE, I see the page but I can't make click on the links.
I write: webBrowser.DocumentStream = htmlDocument;
in the Load event. I've nothing in the URL property.
It's like the blank page is loading in the WebBrowser.
Any ideas?
Thanks a lot !!!!
|
|
|
|
|
How can we assing my custom event to a third party event;
I am using Secure Black box for PGP projects and in C++ I can do something like
Reader->OnCreateOutputStream = DecryptStreamNeeded;
Where Reader->OnCreateOutputStream is the third party event and DecryptStreamNeeded is mine so when OnCreateoutputStream fires it calls DecryptStreamNeeded.
In C++ the declaration above works.
I want to recreate that in C#
Here is the Third party delegate and event
event TSBPGPCreateOutputStreamEvent OnCreateOutputStream;
public delegate void TSBPGPCreateOutputStreamEvent(TObject Sender, MemoryStream Stream);
Here is mine:
//Delegates
public delegate void MyDelegateDecrypt(same params as above);
public event MyDelegateDecrypt MyDecryptEvent;
Here is my function i want to call
public void MyDelegateDecryptEvent(same params as above)
{
Stream = myDecryptStream;
FreeOnExit = false;
}
And now I'm stuck because at this point when myDecryptor.OnCreateOutputStream fires I want it to be redirected to MyDecryptEvent. So when I did this:
myDecryptor.OnCreateOutputStream = MyDecryptEvent;
and I get a type mismatch.
Willowsword
-- modified at 11:45 Saturday 6th May, 2006
|
|
|
|
|
Probably I'm not getting you but you might search for this (assuming that weird 'removed' actually means 'OnCreateOutputStream'):
myDecryptor.OnCreateOutputStream += new MyDelegateDecrypt(MyDelegateDecryptEvent);
Unbdinging is nearly the same:
myDecryptor.OnCreateOutputStream -= new MyDelegateDecrypt(MyDelegateDecryptEvent);
|
|
|
|
|
Thanks, I will try this.
Willowsword
|
|
|
|
|
Could you give me the code please?
|
|
|
|
|
|
Yes
My English is poor
I want to define some methods in the BHO being
then use the Javascript Web Page to dispatch the methods
|
|
|
|
|
dreadknightll wrote: I want to define some methods in the BHO being
What is BHO? What do you mean by it? What does it stand for?
|
|
|
|
|
I am trying to display an image into a table or placeholder. However I get a mis-matched type error. Does some know of how to display an image into a specific location without using the image placeholder tag from VS.
Any help will be appreciated.
Thanks
|
|
|
|
|
Hi.
I want to write a simple spelling and grammer checker application.
spell checker is not difficulp, But because my language is not English grammer checker is difficult for me.
Now I want you say me 3,4 simple grammer in English that implementation of them be simple.
My project is a simple student project, for this implementation of 3,4 grammer is efficient.
Best wishes
|
|
|
|
|
I'm starting to look for a good obfuscator for .Net specifically C# 2005. Does anybody have one they are happy with and would recomend? Or, are there any out there that I should avoid like the plague?
Thanks
|
|
|
|
|
thrakazog wrote: I'm starting to look for a good obfuscator
Why?
"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
|
|
|
|
|
Just a guess, but he probably wants to obfuscate his code...
|
|
|
|