locked
Use Of Call Function RRS feed

  • Question

  • User1900435586 posted

    Hi 

          How can use the call function on page load of mobile web form.?  

        ex:

               Server.Transfer("tel:09871118009")
               Response.Redirect("tel:09871118009")

               RedirectToMobilePage("tel:09871118009")
     

    all of them are not working. What I have to do now? 

      
     

    Saturday, September 29, 2007 5:41 AM

Answers

  • User2032526919 posted

    Hi,

    can't you use PhoneCall control for that? It should initiate the call automatically if the device just supports that.Note: you can also set the number declaratively.

     

    1    <%@ Page Language="C#" Inherits="System.Web.UI.MobileControls.MobilePage" %>
    2    <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
    3    
    4    <script runat="server">
    5    
    6        protected void Page_Load(object sender, EventArgs e)
    7        {
    8            if (!Page.IsPostBack)
    9            {
    10               PhoneCall1.PhoneNumber = "09871118009"; 
    11           }
    12       }
    13   </script>
    14   
    15   <html xmlns="http://www.w3.org/1999/xhtml" >
    16   <body>
    17       <mobile:form id="form1" runat="server">
    18           <mobile:PhoneCall ID="PhoneCall1" Runat="server" />
    19           
    20       </mobile:form>
    21   </body>
    22   </html>
    
     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 29, 2007 10:34 AM

All replies

  • User2032526919 posted

    Hi,

    can't you use PhoneCall control for that? It should initiate the call automatically if the device just supports that.Note: you can also set the number declaratively.

     

    1    <%@ Page Language="C#" Inherits="System.Web.UI.MobileControls.MobilePage" %>
    2    <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
    3    
    4    <script runat="server">
    5    
    6        protected void Page_Load(object sender, EventArgs e)
    7        {
    8            if (!Page.IsPostBack)
    9            {
    10               PhoneCall1.PhoneNumber = "09871118009"; 
    11           }
    12       }
    13   </script>
    14   
    15   <html xmlns="http://www.w3.org/1999/xhtml" >
    16   <body>
    17       <mobile:form id="form1" runat="server">
    18           <mobile:PhoneCall ID="PhoneCall1" Runat="server" />
    19           
    20       </mobile:form>
    21   </body>
    22   </html>
    
     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 29, 2007 10:34 AM
  • User1900435586 posted

    Hi joteke 

     But how can I call ? It does not allow me call like that. I want self calling on page load

     

    Thanx

    Saturday, September 29, 2007 10:53 AM
  • User2032526919 posted

    Now with better thought I don't think it is possible. That's why PhoneCall renders the command to let user to call. I wouldn't want the Page to call without me to approve that.

    Although my mobile controls book states it can initiate it automatically *if only the device supports that* however device most likely (hopefully) asks for confirmation.

    Saturday, September 29, 2007 10:59 AM