I am converting an application from vb.net 2003 to 2005
I have the following function which I call when an input error is
detected:
Private Sub SetFocus(ByVal ctrl As System.Web.UI.C ontrol)
Dim s As String = "<SCRIPT
language='javas cript'>document .getElementById ('" & ctrl.ID &
"').focus() </SCRIPT>"
RegisterStartup Script("focus", s)
End Sub
This is how it is called:
Me.SetFocus(con trolName)
I am getting the following warnings and am unsure how to correct them:
Warning 1 sub 'SetFocus' shadows an overloadable member declared in the
base class 'Page'. If you want to overload the base method, this
method must be declared 'Overloads'.
Warning 2 'Public Overridable Sub RegisterStartup Script(key As String,
script As String)' is obsolete: 'The recommended alternative is
ClientScript.Re gisterStartupSc ript(Type type, string key, string
script). http://go.microsoft.co m/fwlink/?linkid=14202'
With warning 2 I tried the suggested alternative but then it complains
about incorrect number of arguments??
Help! - Thanks 2 2983
vs2005 has this feature builtin. use the builtin or change the name of your
routine.
-- bruce (sqlwork.com)
<gn******@gmail .comwrote in message
news:11******** ************@h5 4g2000cwb.googl egroups.com...
>I am converting an application from vb.net 2003 to 2005
I have the following function which I call when an input error is
detected:
Private Sub SetFocus(ByVal ctrl As System.Web.UI.C ontrol)
Dim s As String = "<SCRIPT
language='javas cript'>document .getElementById ('" & ctrl.ID &
"').focus() </SCRIPT>"
RegisterStartup Script("focus", s)
End Sub
This is how it is called:
Me.SetFocus(con trolName)
I am getting the following warnings and am unsure how to correct them:
Warning 1 sub 'SetFocus' shadows an overloadable member declared in the
base class 'Page'. If you want to overload the base method, this
method must be declared 'Overloads'.
Warning 2 'Public Overridable Sub RegisterStartup Script(key As String,
script As String)' is obsolete: 'The recommended alternative is
ClientScript.Re gisterStartupSc ript(Type type, string key, string
script). http://go.microsoft.co m/fwlink/?linkid=14202'
With warning 2 I tried the suggested alternative but then it complains
about incorrect number of arguments??
Help! - Thanks
Thanks for taking the time to respond, I changed the name of the
function as suggested and that did the trick.
bruce barker (sqlwork.com) wrote:
vs2005 has this feature builtin. use the builtin or change the name of your
routine.
-- bruce (sqlwork.com)
<gn******@gmail .comwrote in message
news:11******** ************@h5 4g2000cwb.googl egroups.com...
I am converting an application from vb.net 2003 to 2005
I have the following function which I call when an input error is
detected:
Private Sub SetFocus(ByVal ctrl As System.Web.UI.C ontrol)
Dim s As String = "<SCRIPT
language='javas cript'>document .getElementById ('" & ctrl.ID &
"').focus() </SCRIPT>"
RegisterStartup Script("focus", s)
End Sub
This is how it is called:
Me.SetFocus(con trolName)
I am getting the following warnings and am unsure how to correct them:
Warning 1 sub 'SetFocus' shadows an overloadable member declared in the
base class 'Page'. If you want to overload the base method, this
method must be declared 'Overloads'.
Warning 2 'Public Overridable Sub RegisterStartup Script(key As String,
script As String)' is obsolete: 'The recommended alternative is
ClientScript.Re gisterStartupSc ript(Type type, string key, string
script). http://go.microsoft.co m/fwlink/?linkid=14202'
With warning 2 I tried the suggested alternative but then it complains
about incorrect number of arguments??
Help! - Thanks
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mad Scientist Jr |
last post by:
i am trying to set focus to a specific control depending on the
outcome of a validator control and it is not working.
none of these methods are working to setfocus:
1. RegisterStartupScript("sf","<scriptlanguage='javascript'>document.form.MyControlID.focus();</script>");
2. Andy Smith's FirstFocus control from
http://www.metabuilders.com/tools/FirstFocus.aspx
|
by: PeterK |
last post by:
I am trying to set Public overridable CreditlimitS() as
System.Data.SqlTypes.SqlMoney to Creditlimit as Double
like CreditLimitS=creditlimit
and get this error "Value of type double cannot be converted to
System.Data.SqlTypes.SqlMoney "
How do I get creditlimit into creditlimitS?
There seems to be no conversion function.
TIA
|
by: Stephen |
last post by:
Hi,
has anyone converted code from VS 2005 to VS 2003?
Thanks,
Stephen
|
by: Chris Davoli |
last post by:
I have written a web site (with other class projects) in VS.net 2003
(VB.Net). What
does it take to convert to Visual Studio.Net 2005? Can the 2003 project just
be opened up in 2005? Will that convert it. The interface for 2005 very
different from 2003.
--
Chris Davoli
|
by: srinivasarao yarru |
last post by:
hi sir,
in access 2003 how we can use the setfocuse property(we have to lostfocuse from one field with in that we have to setfocuse in same field)
i am using this code but not setfocuse to same field :-
Description about this code:-
Sex field is one combo box in two options male-1;female-2
IND_APPL is one combo box here options are applicable-1;not applicable-0
CODE:-
| |
by: srinivasarao yarru |
last post by:
hi
in access 2003 how we can use the setfocuse property(we have to lostfocuse from one field with in that we have to setfocuse in same field)
i am using this code but not setfocuse to same field (this is my problem please give proper gidence for this problem) :-
Description about this code:-
Sex field is one combo box in two options male-1;female-2
IND_APPL is one combo box here options are applicable-1;not applicable-0
|
by: Rick |
last post by:
I have a web service that I converted from VS 2003 Framework 1.1. to VS 2005
Framework 2.0. I tried to use the same IIS web site to run the web service.
I deleted the Framework 1.1 files published the 2.0 files changed IIS to use
Framework 2.0 and changed the application pool, also restarted IIS. When I
try to get to the web service it tells me the file cannot be found. The web
service file(asmx) is in the same place and named the same. The...
|
by: trondhuso |
last post by:
Hi group,
I've found some code that I want to use in a project that I am working
on, but the code is for c# .net and not 2003 or 2005 that I have
available.
In this code the program yells on (float)Convert.ToDouble(xml.value)
(which in this case is "8.25").
I am wondering if someone could tell me how the command is changed in
2003 or 2005 as it stops here.
|
by: lds |
last post by:
I have Visual Studio 2005 Professional Edition installed with Service
Pack 1. I have several solutions and projects that I have migrated
from Visual Studio 2003 to 2005. In most cases the changes I had to
make were small and when the web projects were converted it told me
to
select convert to web application, which I have done.
This one application that I have migrated asks me to convert to a
"web
site project" every time I open the...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |