473,948 Members | 16,435 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[ASP. NET VB .NET] clientID and ClientID

Hello,

as we know VB is not case sensivity. I have a following problem,
I have to send to another server few parametrs by post or get method,
one of them MUST be a "clientID", it's preety simple, but in VB .NET
there is a property ClientID and I get an error, a conflict beetwen
my clientID and ClientID of MyBase class

aspx code:
****
[...]
<form action="page2.a spx" runat="server" method="post">
<input type="text" id="clientID">
<input type="submit" value="Submit">
</form>
[...]
****

aspx.vb code
****
[...]
Protected clientID As System.Web.UI.H tmlControls.Htm lInputText

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
clientID.Value = "i have to do something with this value here"
End Sub
[...]
****

Haw can I solve this problem? In c# this works (case sensivity).
Thanks
Cheers

--
Maras
Nov 17 '05 #1
1 2527
It is not a wise idea, from a CLI standpoint, to have two variables named
the same thing but altered by case only. There is no real way around it, as
this is an aspect of the VB.NET language to keep it "more compatible" with
VB 6.

For base classes, you can "hide" (Shadow) the base implementation and then
call it through a fully qualified call. For example:

Public Class MyBaseClass
Public ClientID As String
End Class

Public Class MyDerivedClass
Inherits MyBaseClass
Protected clientID As System.Web.UI.H tmlControls.Htm lInputText

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
MyBase.clientID .Value = "i have to do something with this value here"
End Sub

End Class

This allows you to access the base implementation, but may not solve your
problem completely. Consider a re-architecture if you are naming values the
same thing in different layers, as you will run into problems.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** *************** **********
Think Outside the Box!
*************** *************** *************** *************** **********
"Maras" <m.********@nos pam.wp.pl> wrote in message
news:bm******** **@news.onet.pl ...
Hello,

as we know VB is not case sensivity. I have a following problem,
I have to send to another server few parametrs by post or get method,
one of them MUST be a "clientID", it's preety simple, but in VB .NET
there is a property ClientID and I get an error, a conflict beetwen
my clientID and ClientID of MyBase class

aspx code:
****
[...]
<form action="page2.a spx" runat="server" method="post">
<input type="text" id="clientID">
<input type="submit" value="Submit">
</form>
[...]
****

aspx.vb code
****
[...]
Protected clientID As System.Web.UI.H tmlControls.Htm lInputText

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load clientID.Value = "i have to do something with this value here"
End Sub
[...]
****

Haw can I solve this problem? In c# this works (case sensivity).
Thanks
Cheers

--
Maras

Nov 17 '05 #2

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

Similar topics

7
1602
by: ani | last post by:
I have two submit buttons in my form which need to validate two different controls on the page . How do I validate portions of the asp.net page. The two submit buttons should validate their respective controls. If anyone has got any articles or sample pages, please forward.. Thanks..
7
4460
by: sck10 | last post by:
Hello, I have the following sub in a class in my "App_Code" directory. The script is for setting focus on a particular control, but I get the error, "Name ClientScript Not declared". Also, I am using MasterPages. How do I use "ClientScript.RegisterStartupScript" in a class? Public Shared Sub SetFocusControl(ByVal FocusControl As Control) Dim Script As New System.Text.StringBuilder Dim ClientID As String = FocusControl.ClientID
6
3911
by: Dorte | last post by:
Hi, I use master pages for ensuring a consistent layout on my app. I need to add client side functionality to my server controls. I do this in page_load (server side) like this: DropDownList1.Attributes.Add("onchange", "Test();"); I add a javascript function ("Test") to the page that changes the disabled property of several server controls when DropDownList1 has changed. In an
4
7785
by: Miguel Dias Moura | last post by:
Hello, I am having problems in accessing controls in my Asp.Net 2.0 pages. I know Asp.Net 2.0 generates a ClientId. In a Javascript function I tried to hide a panel as follows: function ChangePanel() { document.getElementById("<%=Panel1.ClientID %>").style.display =
10
2944
by: Corey B | last post by:
I have a data grid that has three columns: First Name, Middle Name, and Last Name. The grid has a list of people with a blank row at the bottom of the grid (in the footer) that allows the user to add a new person to the list. There is also an Edit button at the end of each row that allows the user to edit a particular row. So far - no problem - easy to do. I have been asked to make the grid section 508 compliant. The requirement is...
3
2249
by: Iain Buchanan | last post by:
Moving this code below from v1.1 to 2.0... am now getting this bug... After I bind a repeater I move the repeater inside the placeholder using controls.add(), but when I do this, all the children's clientids change - I also ran a test and then moved the repeater again into a third placeholder, and surely enough the clientid's change further. The only work around I have found is to bind the repeater again after I move the placeholder, but...
5
18018
by: ~~~ .NET Ed ~~~ | last post by:
Well the subject says it all but I am going to elaborate a bit. As we all now since 2.0 it is possible to access the Header from code behind without much wizardry and that is a good thing. Now, in my site I am using master pages and one of the site pages (but could be more) needs certain customization in which the BODY tag needs the onLoad and onUnload events added to it:
3
2948
by: =?Utf-8?B?U3ViYQ==?= | last post by:
I am using a asp page to dynamically create a stylesheet my asp page creates the following css element when i call the asp page my typing the url in the browser. My asp page works fine............ body { font-family : Arial, Helvetica, Sans-Serif, Verdana ; margin : 0 ; padding : 0 ; }
2
37728
Frinavale
by: Frinavale | last post by:
JavaScript in ASP.NET Using JavaScript in ASP.NET pages can make your application seem to work faster and prevent unnecessary calls to the server. JavaScript can be used to perform client-side functionality in the user's browser without having to make calls back to the server; thus, saving resources. The following example demonstrates how you can use an ASP.NET button to trigger a JavaScript call which modifies an ASP.NET TextBox. ...
0
10167
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11582
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11355
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
10695
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8257
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6120
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
6340
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3547
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.