hi friend. i have a simple question but not sure answer is simple :). how can i run an aspx event with javascript.

thanks

Recommended Answers

All 8 Replies

My only question would have to be why do you need to? You need to think about the fact that ASP runs on the server while JavaScript is on the client.

firstly thank you so much for interest. yes i want o run an event of aspx without postback. so that possible with js. for example we have a textbox for check names in database, when we press 'a' i want to see all datas from db which start with 'a'.

I don't quite understand what you're trying to do. Let me see if I have this correct...

1. Have an ASP text box control on a form
2. The user enters text into the text box
3. Does the user have to press a button or is this on the TextChanged event?
4. Show all values from some database table where a field contains the text entered in the text box with no round trip to the server

yes u understood the question. how can i run TextChanged event without postback :S

How would you get the data from the database if you never sent anything to the server?

i send to db Text of TextBox whit TextChanged event, for ex; 'a'.
and TextChanged event runs the codes and gets data from db.

What you are describing is easily accomplished with standard .NET code. I don't quite see why you're trying to use JavaScript (...if it's even possibly to do so in this scenario).

i have to use js, because my project based on .net and js. and this is just a scenario. i have run .net event with js function. anyway thank you so so much my dear friend. yours respectfully

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.