How to pass a parameter to a function that is called on an event?

Let’s learn how to pass a parameter to a function that is called on an event. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

Pass new parameter to function called in OnItemDataBound event

I have a question regarding the OnItemDataBound event and I'm hoping someone can help me out. Right now I have and the function definition is: protected void FillRepeater(object sender, RepeaterItemEventArgs e) What I'd like to do is pass a parameter to the function like this: But I'm not sure this is possible? I've edited my function definition to protected void FillRepeater(object sender, RepeaterItemEventArgs e, int num) but I'm not sure how to edit the markup to pass the first 2 expected...

Answer:

You can't modify the signature of ASP.NET server control event handlers, but I suspect that you're trying...

Read more

Felipe Kettle at Stack Overflow Mark as irrelevant Undo

Other solutions

My Fn key (Function key) does not work on my Sony VGN-NW235F. What do i do?

I restored my laptop which is a Sony VGN-NW235F running Windows 7 "Home edition" to its original factory couple of days ago & now the Fn Key (function key) is not working for some reason. I did some research and the following is the best...

Answer:

I'm not sure but http://esupport.sony.com/US/perl/model-h… go to the sony support site and download...

Read more

ali f at Yahoo! Answers Mark as irrelevant Undo

An odesk contractor appears to have added a script to my site.  I want to be fair, is there any way this is a mistake?

He was modifying an existing site.  The site he created caused several words on my page to appear hyperlinked and when you moused over a little advertising window appeared.  My site did NOT do this before.  I commented out a script that was not on the...

Answer:

data.htm is an entry point and run.js contains the actual code to add underlined ads as well as what...

Read more

Deep Joy Majumdar at Quora Mark as irrelevant Undo

C++ programming questions?

1)Write a program that prompts the user to enter an integer (0-999), and then outputs each digit separately. The user should be able to enter integers and see the digits as many times as they want, a negative integer will signal the program to quit....

Answer:

Did you attempt to do any of these programs? I see no incentive for me or anyone else to do them for...

Read more

~V3N0M~ at Yahoo! Answers Mark as irrelevant Undo

C++ newbie: how can I store long member functions of a class in a separate file, but still access the class?

Hi everyone: Sorry, my question probably is not very elegantly worded! I have written a class in a .cpp file and a .h file. I want to make my code more readable for users. It is very long. So I have created .cpp and .h files for storage called "...

Answer:

i dont see any problem in that. Just make sure you Include you class file by #include <FileName.h...

Read more

Antst at Yahoo! Answers Mark as irrelevant Undo

JavaScript error handling help - please!!?

Write JS code that anticipates and handles an error for an expected numeric field. This code is executed on keypress, and the entered value is saved for you in a variable called enteredChar. Include the try block of JS statements needed to check if the...

Answer:

Try adding new variables and see if that helps.

Read more

Darian at Yahoo! Answers Mark as irrelevant Undo

Simple JavaScript help?

Write a custom error handling JavaScript function called processErrors that handles a custom error by assigning it to the onerror event handler. Include the block of JavaScript statements needed to pass the arguments sent by the JavaScript interpreter...

Answer:

<script type="text/javascript"> var errordialog=function(msg){ alert(err); return true...

Read more

Brittney at Yahoo! Answers Mark as irrelevant Undo

Simple JavaScript help?

Write a custom error handling JavaScript function called processErrors that handles a custom error by assigning it to the onerror event handler. Include the block of JavaScript statements needed to pass the arguments sent by the JavaScript interpreter...

Answer:

Do you mean this? try { //Run some code here } catch(err) { //Handle errors here }

Read more

Darian at Yahoo! Answers Mark as irrelevant Undo

Need help with Javascript!!! Please!!?

Someone, please help me! I have a Javascript homework assignment and I am very lost / stuck... My instructions are to "Write a page which displays a button, when the button is clicked, a javascript function will be called to process the button....

Answer:

<html> <head> <script type="text/javascript"> function prompter() { var...

Read more

moltonbo... at Yahoo! Answers Mark as irrelevant Undo

Will you join us ??

Ok you have to stick with me on this one you guys. I know it is a long one but PLEASE, PLEASE read all the way. This is my Plea. My son battles this disease called CANCER everyday, and I myself am a two time cancer survivor.. But this is neither about...

Answer:

Hello, I'm sorry to hear about you your son and all the people that this has effect in their life if...

Read more

cturtles... at Yahoo! Answers Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.