Tuesday, 8 April 2014

Send SMS on Mobile for Verification or Anything in ASP.Net

To do this you will have to purchase SMS service , I don't know whether this service is free or not but you will have to purchase it.
Okay, Take two textbox one for mobile no and one for some code you want to send and one button to click
When user enters mobile no message automatically goes to it's mobile no you can dynamically assign random code for user but here I am using textbox to send code.
now take an iframe and give it an id 'frame_id' and in the button click event assign src attribute dynamically, it will send code to its corresponding mobile no.

make a function

protected void sms_send_method()
string string_of_connection=""; // here you will have to write connection of sms url given by company you purchased

frame_id.Attributes["src"]= string_of_connection;