473,386 Members | 1,644 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.

How to setup a sub this way

first off - let me say that I'm not using VS.Net - all Inline coding ....

I have a form (using tabstrip) that has a couple of sections - -
CustInfo
BillingCustInfo

I want the name, address, etc to be duplicated from the Custinfo section, to
the Billing Section automatically, for each field....(naturally, allowing
editing at a later point, when necessary)

SO - I added a Subroutine, to do this using the onTextChanged Event, when
the textbox loses focus:

Sub doTextChange(sFrom as TextBox, sTo as TextBox)
sTo.Text=sFrom.Text
End Sub

Then, - thinking more simply than I should, adding:
OnTextChanged="doTextChanged(txtCustName, txtBLNGCustName)"

however, I get the following error:
Sub doTextChange(sFrom As System.Web.UI.WebControls.TextBox, sTo As
System.Web.UI.WebControls.TextBox)'
does not have the same signature as delegate 'Delegate Sub
EventHandler(sender As Object, e As System.EventArgs)'

If figured this would be an easy way to populate sections, field by field,
with minimal coding - - but I guess I was wrong
Can someone help me learn what it takes to get something like this working?

Nov 18 '05 #1
1 831
the error message is telling you that the text changed event actually
expects parameters of type object and EventArgs

eg

sub txt_changes(sender as object, e as EventArgs)
txtto.text = txtfrom.text
end sub

OnTextChanged="doTextChanged(txtCustName, txtBLNGCustName)" will not
hook up the event - instead specify the event in the server tag
<asp:textbox id='txtto' runat='server' ontextchanged='txt_changes'
autopostback='true' />

have a look here for some good basic
informationhttp://www.w3schools.com/aspnet/aspnet_textbox.asp

also consider javascript for this type of thing, it will be more
efficient as no server round trip will be required...
Nov 18 '05 #2

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

Similar topics

4
by: Richard Shea | last post by:
Hi - This is probably quite a stupid question but I've never understood what setup.py does. I've got a situation at the moment where I would like to use a script (which someone else has written and...
4
by: pbj | last post by:
my application was created in vb.net, vs 2003. the setup project was also created in vs 2003. one of my application reviewers reported this: The .Net link that is included in the setup is not the...
2
by: serge calderara | last post by:
Dear all, I have build a setup project for my VB.NET application, I need to know the installation path of an application in order to add file in it. How can do that inside my setup project ?...
5
by: paul kölle | last post by:
hi all, I noticed that setUp() and tearDown() is run before and after *earch* test* method in my TestCase subclasses. I'd like to run them *once* for each TestCase subclass. How do I do that. ...
0
by: Adam Clauss | last post by:
I have a C++ COM Addin I wrote for Outlook (2002) using VS.Net 2002. Having completed it, I am now looking to create a setup project and install it on another machine. I created a setup project...
4
by: Howard Kaikow | last post by:
When I build a setup project, the dependency in the setup project is tied to the version in which it was built. Is there a way to build a setup project that can be used in both versions of the...
2
by: A.Carter | last post by:
I am developing a windows application with Visual Studio 2003 using C#. The application is complete so naturally I went to create a setup package. I added a setup project to the solution and I went...
1
by: rohan_from_mars | last post by:
I have a windows service and am also using Enterprise Library June 2005 version. Now i have created Setup and Deployment Project which installs the service. but how do i add EL dlls-...
6
by: andrewbb | last post by:
I want to deploy a service with a windows app and the setup program must conform to the Vista certification requirements. Can that be done with the standard .net setup project? Assuming cost is...
6
by: Srini | last post by:
Hi, I am facing a problem in localizing the setup file and .NET framework redistributable. I am trying to deploy c# winform application. I have created a setup project. I need to...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.