473,386 Members | 1,883 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,386 software developers and data experts.

[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.aspx" runat="server" method="post">
<input type="text" id="clientID">
<input type="submit" value="Submit">
</form>
[...]
****

aspx.vb code
****
[...]
Protected clientID As System.Web.UI.HtmlControls.HtmlInputText

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) 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 2488
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.HtmlControls.HtmlInputText

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) 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.********@nospam.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.aspx" runat="server" method="post">
<input type="text" id="clientID">
<input type="submit" value="Submit">
</form>
[...]
****

aspx.vb code
****
[...]
Protected clientID As System.Web.UI.HtmlControls.HtmlInputText

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) 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
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...
7
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...
6
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:...
4
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...
10
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...
3
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...
5
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. ...
3
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...
2
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
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...

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.