473,395 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Creating Attribute/Calling Server VB.NET Function

Here's my problem.

I'm using a TreeView that doesn't have dblclick as an attribute. So I
attempt to create an attribute for that but using below code:

Me.tvEntities.Attributes.Add("onclick", "ExpandNode()")

This is code for ExpandNode() in client side:

<script language="VBScript" runat="server">
Private Sub ExpandNode(ByVal sender As Object, ByVal e As
System.EventArgs)
Textbox1.Text = "Hello!"
End Sub
</script>

For some reason, ExpandNode is not called. Did I write wrong code for
adding an attribute? Thanks in advance.
Nov 18 '05 #1
2 1679
client code cannot call server code. you will have to use some postback
technique.

-- bruce (sqlwork.com)
"Anonymous" <An*******@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
| Here's my problem.
|
| I'm using a TreeView that doesn't have dblclick as an attribute. So I
| attempt to create an attribute for that but using below code:
|
| Me.tvEntities.Attributes.Add("onclick", "ExpandNode()")
|
| This is code for ExpandNode() in client side:
|
| <script language="VBScript" runat="server">
| Private Sub ExpandNode(ByVal sender As Object, ByVal e As
| System.EventArgs)
| Textbox1.Text = "Hello!"
| End Sub
| </script>
|
| For some reason, ExpandNode is not called. Did I write wrong code for
| adding an attribute? Thanks in advance.
Nov 18 '05 #2
Bruce, does this means that when you try to add an attribute using
attributes.add, it means it can only call client code (ie., no runat="Server"
for a script tag)? Is that why my code failed? Thanks.

"bruce barker" wrote:
client code cannot call server code. you will have to use some postback
technique.

-- bruce (sqlwork.com)
"Anonymous" <An*******@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
| Here's my problem.
|
| I'm using a TreeView that doesn't have dblclick as an attribute. So I
| attempt to create an attribute for that but using below code:
|
| Me.tvEntities.Attributes.Add("onclick", "ExpandNode()")
|
| This is code for ExpandNode() in client side:
|
| <script language="VBScript" runat="server">
| Private Sub ExpandNode(ByVal sender As Object, ByVal e As
| System.EventArgs)
| Textbox1.Text = "Hello!"
| End Sub
| </script>
|
| For some reason, ExpandNode is not called. Did I write wrong code for
| adding an attribute? Thanks in advance.

Nov 18 '05 #3

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

Similar topics

30
by: Sean R. Lynch | last post by:
I've been playing around with Zope's RestrictedPython, and I think I'm on the way to making the modifications necessary to create a capabilities-based restricted execution system. The idea is to...
4
by: venk | last post by:
Hi, given below is my interaction with the interpreter.... In one case, i have created the class method using the "famous idiom"... and in the other, i have tried to create it outside the class...
6
by: Davinci_Jeremie | last post by:
Hi Newbee here to C# I have a simple questions... In a Hello world example how does the class object Hello exist with out creating it? I come from object pascal where everything object is...
15
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use...
3
by: Ken Varn | last post by:
I am just starting the process of creating ASP.NET server controls. I have created controls for .NET applications, but have just started with ASP.NET. I am a little confused about some areas that...
2
by: Steve Caliendo | last post by:
Hi, In the Page_Load sub, can someone tell me what code to place to create a pop-up window? Thanks, Steve
2
by: jlopes151 | last post by:
Question: I'm creating an ASP.NET webform and I have questions about how the ASP.NET form works. In ASP or HTML a form with an action will transfer that forms items to another page. From the...
2
by: crystalattice | last post by:
Not sure how to explain, but I'll try my best. I'm making a GUI with wxGlade. The GUI has windows that open when the "Next Page" button is pushed; the button also pickles the information that is...
6
by: Adam Donahue | last post by:
As an exercise I'm attempting to write a metaclass that causes an exception to be thrown whenever a user tries to access 'attributes' (in the traditional sense) via a direct reference. Consider:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.