Home Screen :

Name of Experiment : Send an SMS

Exp No : MC6

Background : Student should have a basic knowledge of C#.

Summary : Sending SMS is an in-built functionality of the mobile device. But, sometimes we require this activity through your own app. Using this experiment you will get to know, how to add this functionality in your current Mobile App development.

Learning Objective : To learn the activity of making call through this experiment.


Target Platform : This experiment is tested on Windows Phone Emulator and Nokia Lumia 800.



Source Code : Comments :
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>

<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ExperimentTitle" Text="ExpNo MC6" TextAlignment="Right" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="ApplicationTitle" Text="Mobile Computing" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text=" Sms" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>

<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Button Content="Send SMS " Height="72" HorizontalAlignment="Left" Margin="12,154,0,0" Name="button1" VerticalAlignment="Top" Width="438" Click="button1_Click" />

 Exp No MC6(Experiment title)

 Mobile Computing(Application title)

 Sms(Page title)

 Send SMS (Button Content)
using System;
using System.Windows;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;

namespace SmsTask
public partial class MainPage : PhoneApplicationPage
PhoneNumberChooserTask _numberchooser;
SmsComposeTask _smschooser;
// Constructor
public MainPage()
_numberchooser = new PhoneNumberChooserTask();
_numberchooser.Completed+=new EventHandler<PhoneNumberResult>(_numberchooser_Completed);

private void _numberchooser_Completed(object sender, PhoneNumberResult e) {
if (e.TaskResult == TaskResult.OK) {
_smschooser = new SmsComposeTask();
_smschooser.To = e.PhoneNumber;

private void button1_Click(object sender, RoutedEventArgs e)


 Initialise PhoneNumberChooserTask SmsComposeTask



Observation : It is observed that we can use this experiment in different Mobile App development.

Video Link

For Windows Phone


Right Click Here And Select Save Target For Entire Download :

Send an SMS Experiment