473,765 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling a Javascript function using VB.NET Codebehind

Hello Everybod

I have a problem hope you can help me out

I have a treeview and on the selectedindexch ange event of the treeview I want to execute some code from the vb codebehind file and a javascript function which is there in the HTML file.I am using VB.NET as the language. Now If I want to execute both these codes I need to click the nodes twice. I had Added the attributes to the treeview. something like this in the Page_load even
TreeView1.Attri butes.Add("onse lectedindexchan ge", "Showme();"
Also trie
TreeView1.Attri butes.Add ("onselectedind exchange", "javascript:Sho wme();"
Also trie
Response.Write( "<script language='javas cript'>Showme() ;</script>"
but it doesnot work.
I WANT TO CALL THE FOLLOWING CODE IN ASP.NET HOW DO I DO THIS PLEASE HELP

parent.frames(" Frame3").locati on.replace("Web form4.aspx")

So as a solution to this What I did is i added a Button added attribute of the same function to it. Now I want to call the Button_click(By Val Sender as System.Object,B yVal e as Event.Args) event from the treeview_select edindexchange () event. What Arguments should I pass in order to execute this button_click() event. I mean to say is what would be the Sender and what will be the event args in this case. Please Help, Its very Urgent

Regards & Thanks
Rahu
Ra****@easypack .bz

---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 18 '05 #1
0 8426

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1847
by: Prescott | last post by:
I want to execute a javascript function that will set a value in the parent window from the child widow where its called and then post the form to the server. I seem to be able to execute one or the other but not both. The child page (html) code is: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="AddKeyWord.aspx.vb" Inherits="ComponentSearch.AddKeyWord"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML>...
0
8791
by: Scott Wallace | last post by:
I have a page that displays several pictures pulled from a database. I want any one of the pictures to appear in a larger main picture container when the user clicks on it. I want to do this on the client side so that the page doesn't post back. I have the following JavaScript function in my HTML: <script> function change(pic) { centerPic.src=pic
2
12441
by: exshige | last post by:
I read from some book that you can actually on any tag in the html page put a onClick or something and assign it with the sub/function name that is in the codebehind. I tried but it say name undefined. I am trying to make a rollover effect using codebehind. I have a <a> tag that onmouseover will call a sub in codebehind to change a <asp:image> image url. How come i can see a lot of "on" events of the <a> in the html side but when i...
2
2842
by: Alex | last post by:
Hi all, I'm writing a small web application which searches a database based on a date field, and populates a datagrid control with the results. The datagrid control has selection buttons added to it to view additional details about the selected result (a second database query is triggered). I want this second query to pop up in a new window, the way it would if I used "window.open" in javascript. I've added a function in the
2
1964
by: Ekken Zuiber | last post by:
hiye people, i know this have been ask multipletimes over the past year, but i cant find any here in the new group so here goes.. in my code behind, i'm going to do some validation and use javascript to throw the msg out to them, these errors msg are query from the db 1st, how can i call a javascript function from codebehind. is there any other way besides response.write = "<script></script>" ?? 2nd, can someone recommend me ways i can pass...
1
5407
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for that), the popup window will have also a text box and a button. when the User click on the button the value on the textbox will be send back to the textbox on My_WUC. I hope I was clear off what I want to do. I've been searching for some ideas...
7
33872
by: =?Utf-8?B?Qw==?= | last post by:
I have a dropdown list as below. I add an onchnage attribute in my codebehind to call some Javascript. I want to get the selected text from my dropdown. What am I doing wrong below? <asp:DropDownList ID="ddlStatus" runat="server" /> In my codebehind
4
1595
by: =?Utf-8?B?UmljaGFyZA==?= | last post by:
Hi, I have an ASP .NET page with codebehind in a vb file. The page has a dropdown control, and a JS function which used HTTP XML Request to get the data from the database, and populate the dropdown. Actually, the JS creates the OPTION elements using th retrieved db data, and adds them to the SELECT element using DOM objects. The dropdown works ok, and the items are visible, but when the user clicks "Save" button, and the page posts...
1
3632
by: ahmh | last post by:
The javascript function is called getsportart2 in the codebehind page_load I have the following Page.RegisterStartupScript("MyScript3","<script type='text/javascript' src='http://www.halaeducation.com/media/modules/sports/getsportart2.js'></script>"); I would like to activate this function as soon as the page load. I do not have a problem with activating this function from the <body onload=""> but I have a problem doing so from...
0
9399
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9957
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8832
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5276
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.