Problem with Event/Event Handlers

I have this as a part of an assignment:  

Create a very basic virtual phone using an ASPX file that displays a textbox and a button named CALL. Configure your aspx file so that when you type a telephone number into your textbod and press CALL, you are:
Presented with a message confirming the number you are calling
Presented with another button called DISCONNECT that, when pressed, returns you to your opening page, leaving you ready to type another number
I am a newbie to ASP.Net and I understand the concept of events and event handlers, but how do I get the result asked for above? I am drawing a blank, and the textbook I have doesn't provide me any help (that I can decipher anyway)
2/11/2005 2:18:59 AM 91979 articles. 3 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 15

I would suggest studying the tutorials on this site (Fourth tab from the left above) and reading the section 'ASP.NET Web Forms'.  There are many good examples that you could use to help you understand events/event handling as well as web form control manipulation so you can complete the assignment yourself.
2/11/2005 3:33:35 AM
Sub Call_Click(ByVal Src As Object, ByVal E As EventArgs)

' Do something with Phone.Text
End Sub

<asp:TextBox id="Phone" runat="server" />
<asp:Button id="Call" OnClick="Call_Click" text="Call" runat="server" />

Pandora Tomorrow
2/11/2005 3:51:32 AM

Similar Artilces:

Start Client Timer from Server Event and start server Event from client event
All of you, I have a big challenge which i'm not able to resolve. I need some experts with samples on this. Situation for a webbased quiz system I have a data set with e.g. 5 questions. The process should be like 1. Load Question 1 from database, there is also a picture and a MP3 sound file 2. I connect the MP3 sound file to a webcontrol I've written to play Mp3 with a flashmovie. 3. Once this mp3 is played (the question is read for people with reading problems) an Event should be raised from the client to the server. 4. The event from 3 should start a Countdown timer (15 se...

Events and Event handlers
 Hi ,What are the Events and Event Handlers and How we create events and events handlers in asp.netand where we use .   adilahmed Hi, You can find a video about Events "Lesson 3" In general , an Event is fired when some thing [an event] happens and then you should choose your Event Handler [a function that is executed when the Event is fired]. In C#, to know about Events I think you should start with delegates [they simply points to the Event Handler fn.] and then go to Events and Event Handlers. In ASP.NET , the ...

Event handler calling another event handler.
I want to know if an event handler can call another envent handler. Say you have two buttons. Button1 and Button2. Button1 has some code which executes when it is clicked. Now, I want Button2 to do the same thing as Button1, but I dont want to duplicate the code. Is there anyway Button1's click event handler execute when Button2 is clicked. I tried calling the event handler of button1 when button2 would get clicked, but it gave me errors. this.button1.Click += new System.EventHandler(this.button_Click);this.button2.Click += new System.EventHandler(this.button_Click);  p...

Problem with re-assigned event handlers not triggering their requisite events
I have some Click events which are designed to load certain pieces of data into tables on a page. They do this by clearing the table, then running a function which populates it (as the function is already called in Page_Load, and can't be removed as it will stop the later click events triggering at all). Eg:1 protected void editButton_Click(object sender, EventArgs e)2 {3 string taskID = Session["taskid"].ToString();4 int id = Int32.Parse(taskID);5 6 manageTask.Controls.Clear();7 manageTask.Rows.Clear();8 9

Getting The Event's Name Fired In Page.Load Event Handler
Hi,How to get the event's name / type that is fired in Page.Load event handler? I'm trying to create an exceptional procedure in Page.Load event handler when some certain events are fired.Thanks in advance  i think you can try this code and modify it yor requirnment Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If IsPostBack = True ThenMe.Label1.Text = Me.Page.Request.Params.Get("__EVENTTARGET")  Dim ctrlname As String = Page.Request.Params.Get("__EVENTTARGET") If (Not ctrlname Is Nothing And ctrlnam...

DropDownList's event handler is not getting called after migrating to .Net 2.0
We have a perfectly working .Net1.1/Visual Studio 2003 application. We recently migrated our application to .Net 2.0/Visual Studio 2005. After migration, selectIndexChanged event handler of DropdownList is not getting called. Event is getting fired and the page is posting back, but the event handler is not getting called. I have been struggling with this for the past few days. ANy thoughts would be very helpful. Thanks       I am sorry. After spending a lot of time debugging I found out that there was an improperly handled exception before going into t...

Object state, events and event handlers
Hi all! I have an aggregator object who sends messages to satelite objects. The satelite object does the job and rises an event giving the result of the operation. Simple example: public class Aggregator { public Aggregator() { ... initialize the satelites ... subscribe to the satelites' events ... more init logic } public result DoSomeJob(parameter) { for satelite in satelites satelite.DoSomeJob(parameter); } private void DoSomeJobEventHandler(object sen...

Attach event handler to window events?
I'm trying to set up some script to respond to onkeypress events on the window object. I want to respond to the window event instead of a textbox event because I'm trying to enable Excel-like nagivation between for elements using the arrow keys. The following works in Firefox, but not IE:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> <html xmlns=""> <head> <title>Untitled Page</title> <script type="text/javascript" src="MicrosoftAjax.js">&...

Control Event Handlers event order.
For change events etc. is there any documentation on the order they will fire? Specifically If I have an aspx page containing a user control will all of the change events for the page be processed before those of the user control? TIA,  Martin   See the following - ASPX Page LifeCycle Control Events should fire after Page_Load. The order of the actual controls will determine the sequence of control events, and the sequence of events raised by an individual control will be determined by that control. Rgds, Ma...

single event for multiple Event handler
hi,  I am using Linkbutton. if i Click the Linkbutton it should perform the two actions . how we should write the code for it.          Thank u in advance  If you just have 1 event handler that handler can call 2 methods which perform the actions you require. You can pass them the parameters if needed.You can also in the code behind add another reference to a function for the second event if needed.myLinButton.Click += NameOfTheMethod;I hope that helps,Brendan C. Brendan EnrickBrendan's BlogMake sure you click "Mark as Answe...

Event Handler Problem
Hey everyone, In a webform I'm designing, I have a drop down list and a check box list inside a placeholder. The check box list is supposed to be dynamically populated based on what selection the user makes from the drop down list. I define a method to handle the drop down list's OnSelectedIndexChange event, and the drop down list is set to autopostback. I'm having two problems. First, the drop down list does a postback when the selection is changed, but only the page.load event is called, and the event handler is skipped. Second, the selection change never seems to stick. Th...

Problem with Event Handler
Hi all I'm having a bit of a problem getting a dynamically added LinkButton to "hook up" with an EventHandler. The LinkButton is being dynamically added to a TableCell, and it appears on the webpage perfectly. However, clicking on the link does not cause the "click event" to fire. Here is the code I'm using to add the control:tblCell = New TableCell If ((pageNumber + 1) * 20 < noticeCount) ThenDim lnkNext As LinkButton = New LinkButton() lnkNext.Text = "More Due Dates"AddHandler lnkNext.Click, AddressOf lnkNext_Click tblCell.Controls....

Problem with event handler
Hello, I have a custom control where I have a button. I need to raise the event FormSubmited after all the code, in Button_Click, is finished. The problem is when I check FormSubmited in my page nothing happens: Private Sub Form_FormSubmited(ByVal sender As Object, ByVal e As EventArgs) Handles Form.FormSubmited    Response.Write("For Was Submited") End Sub My custom control code is as follows:   ...   Public Class Contact     Inherits WebControl     Private Sub bSubmit_Init(ByVal sender As Object, ByVal e As System.EventArgs)   &nb...

Event Handler Problem
Why would an event handler not attach to a DropDownList box in a Datagrid? I am trying to have a single DropDownList for each row in a DataGrid. I would like to point all DropDownList boxes to a single SelectedIndexChanged event. It does not appear to be possible. Has anyone ever done this? And before you post, please see: view post 318419 for more elaboration.Thanks! Cory ok I did this for a dropdownlist in my datagrid that when clicked hid another dropdownlist depending on the value chosen. What I did was that in the ItemCreated event of the datagrid I added the event handler ...

Web resources about - Problem with Event/Event Handlers -

Daniel Handler - Wikipedia, the free encyclopedia
C. S. Lewis , Vladimir Nabokov , Roald Dahl , Edward Gorey , Franz Kafka , Edgar Allan Poe , Zilpha Keatley Snyder , Dino Buzzati Daniel Handler ...

Daniel Handler (@DanielHandler) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Daniel Handler @ DanielHandler ...

Chelsea Handler - Flickr - Photo Sharing!
Chelsea dancing to KT Tunstall. And showing us that she's really taped in. (UPDATE 8/7/07 - 7,983 views and finally someone marks it as a favorite!) ...

Howard Stern Show - Chelsea Handler Interview 03/05/14 - YouTube
Chelsea Handler returns to the stern show !!! Chelsea Handler returns to the stern show !!! Howard Stern Show - Chelsea Handler Interview 03/05/14. ...

Efremi, the crack-addicted ‘handler’ of stolen goods who treated Spence like a ‘son’
A profile of Spence's co-accused, Thomas Efremi, who would regularly host his younger friend for drugs binges.

Encounters with pet dogs a serious danger for guide dog handlers
It takes more than $30,000 to train a guide dog, but one of the biggest threats to their effectiveness and a costly early retirement are seemingly ...

From baggage handler to $53m man
Ashley Robinson once loaded bags at what was then Maroochy Airport. He now finds himself in charge of the dispersal of $53 million in grants ...

Baggage handlers filmed stealing from bags
A hidden-camera sting has caught a group of Italian baggage handlers stealing from passengers' bags in what is likely the only place at an airport ...

Croc handler loses thumb at Qld zoo
A reptile handler has had his thumb bitten off during a crocodile attack at a Queensland wildlife park.

Russian plane crash: Baggage handlers interrogated
A baggage handler at Sharm el-Sheikh airport may have smuggled a bomb on board Flight 7K9268, investigators suspect.

Resources last updated: 12/25/2015 6:39:05 PM