.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Set contents of textbox when click to call phone number

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application

So I have a text box


li class="textwidth">   
<label class="labelwidth" for="txtLine1">
    Phone #:</label>   
<asp:TextBox ID="txtPhoneNumber" runat="server" Width="202px" onkeydown="javascript:backspacerDOWN(this,event);" onkeyup="javascript:backspacerUP(this,event);" CssClass="inputwidth"></asp:TextBox>

When they click on this or when they click on something by this textbox I want it to call the phone number.

The ACTUAL phone number is filled in the pageload event:

If Not (SPPhone Is Nothing) Then
            Me.txtPhoneNumber.Text = SP.PhoneNumber

I know about the <a href="tel but I don't understand how I can implement it, since I don't know the phone number until the page actually loads.

Thanks for any and all help!

View Complete Post

More Related Resource Links

Format phone number in asp.net textbox control

Hi,  I have a <asp:textbox> control, I want to display text as a phone number format like phone number mask. Anybody can help on this. Thanks in advance.

Getting IMEI number of a mobile phone

I am developing an  asp.net web application which supplies content to mobile phones  , Im trying to get the imei number of  mobile phones using thier numbers. How can we achieve this?

Alert popup on Gridview Textbox Click

Hi,I am trying to make a Javascript Alert appear when someone clicks on a textbox that is part of a Gridview. the textbox is an Item template and I have an onclick="NotePopup()" in the TextBox properties. I am having trouble grabbing the correct ID of the text box, because it is nested inside a gridview. I have been looking around on Google for a solution but none of the responses are working for me.  The gridview will have multiple rows, so each textbox that could potentially be clicked will have a different ID, is there any way to pass the correct ID to the Javascript, or have the Javascript function grab the correct ID?I did use var Control = '<%= GridView1.ClientID %>';then cut and paste the ID from ViewSource of a textbox and append it to the Control Variable,  to test out the popup and it does workThanks for your helpChris

How to call a method with IDataObject in click event in wpf?

As I'm new in WPF development, I came up with a problem, looks like simple, however, I couldn't solve. The problem is, how to call a method with IDataObject in a click event?? I've a method like:  public void setProperty(IDataObject obj)         {                                      PropertyGrid mygrid = new PropertyGrid();                        UIElement elt = ExtractElement(obj);             Type t = elt.GetType();             string name = (string)t.GetProperty("Name").GetValue(elt, null);             mygrid.Instance = name;         } I want to call this method in a click event. I don't know how to. I've tried but couldn't yet. Any help will be appreciated regarding this. Thank you.   Regards, Binaya

When I click on a TextBox the text moves a little bit for Vertical Alignment

I have a Grid of text boxes defined in the XAML using the following code:         <Border Grid.Row="2" Grid.Column="11" Style="{StaticResource BorderStyleContent}" >             <TextBox Text="-15.11" Style="{StaticResource EditableTextBox}"/>         </Border> The styles are defined below:         <Style x:Key="BorderStyleContent" TargetType="Border">             <Setter Property="BorderBrush" Value="Black"/>             <Setter Property="BorderThickness" Value="1"/>             <Setter Property="Padding" Value="2"/>             <Setter Property="SnapsToDevicePixels" Value="True"/>         </Style>         <Style x:Key="EditableTextBox" TargetType="TextBox">         &nb

How to count number of characters in a textbox?

On my current form I have it validating a Canadian Postal Address (xxx xxx). The space is optional but if the user does not use a space, then once the validation passes it will insert one. How can I count the first 3 characters of the textbox, insert a space, then add the rest of the characters?Thank you

How might I add a "Phone Call Memo" list to other sharepoint 2010 sites?


The group work site comes with that really nice list using it's custom content type and so on, I'm interested in being able to create that same list onto other sharepoint 2010 sites instead of having to use it only as the default list from that template.


Thank you for your help.

how to display sharepoint 'document library' contents (i.e number of documents) into datagridvie



i have some docus in documents library of sharepoint server 2007, i need to display these documents into datagridview of windows form application.

please provide related code...



How can I process a triple-click event on a TextBox?


I've tried the MouseClick and MouseDown events, but the clicks arg in MouseClick is always 1 and in MouseDown is always 1 or 2.

How can I process a Triple-click?

How to call a button click event on from an event handler



I got an event handler like this, in this event, i wanted to call another button click event. How can I do that?

protected void gwDetail_SaveCommand(object sender, System.EventArgs e)
            lblMsg.Text = "Saving...";


if (ds.Tables[0].Rows.Count == 0)

Call Javascript method on Click


Hi ,

I want to call Javascript method on Linkbutton click.

How i can do this.

I m trying this-:

StringBuilder sb = new StringBuilder();
                sb.Append("<script language=javascript>");
                ScriptManager.RegisterStartupScript(this.Page, GetType(), "test", sb.ToString(), false);

it's doning well but given some probs so tell me another way.

how to call button click event of ascx page in the button click event of aspx page



i'm using user control in my page.i need to call the button click event of user control in the button click event of aspx page based on some condition.is it possible?can any one help me?

Phone number dialer


Hi everybody

I need to make an application that dial a phone number and then register the response status for statistics issue (if it was connected, if the line is busy, etc)

How can I manage those signals? May I use SerialPort object?

Please, if you have some example code, I will appreciate so much

Thanks in advance

Dr CRs


Retrieve caller ID number from VOIP phone

I am wanting my program to be able to retrieve the caller ID number when a call is received through my VOIP phone.  I know this is possible but I need someone to point me in the right direction of how I would go about this.

Thanks for any help

How to make number of columns of Gridview depends on a textbox value?


I have a Gridview with 12 columns, Jan, Feb...Dec.
I have a textbox value that could be 1, 2,...12

I want if textbox value is 7, then column Aug-Dec in Gridview is editable when in update mode and the column in Jan-Jul is not updatable (eg make it label instead of textbox).

How can I do this ?


How to change text of TextBox, when i click into that TextBox



 i am developing a web portal.

my home page contain a search textbox with text "Enter key word", and i want this text will be flush if any one click on that text box.


Unable to call javascript function through button's click



i have a javascript function that is placed in a separete file.There are some other functions also.

On a Button's OnClientClick i want to call a javascript function, but it is not called.When i put the same function in my aspx page that function is called. So how can i call that function which is placed in another .js file.

I  have taken some other controls like radio button , that is working fine when i call some functions  that is placed in the same .js file.

I have written like this in Button's OnClintClick property:



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend