ASP.Net click on a phone link open it on the dial pad

Hi Experts,

I have a gridview in which one column is phone number. When I click on the phone link I want it to open on the phone's dial pad. My code is in VB.NET.

Thank you.
RadhaKrishnaKiJayaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
have you tried using the tel: link?

<a href="tel:1235557789">Test Phone</a>
0
Maheshwar RSoftware DeveloperCommented:
if your opening the webpage on the phone then you need to provide "tel:" in the grid view column style
0
RadhaKrishnaKiJayaAuthor Commented:
Thank you very much for your reply. The following is my code. Can you please tell me how to use "tel" in my code.

<asp:TemplateField HeaderText="Business Phone">
                        <HeaderStyle Width="5%" />
                        <ItemStyle Width="5%" />
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                        <ItemTemplate>
                             <asp:LinkButton  ID="lblBusinessPhone" runat="server" Text='<%#Eval("BusinessPhone")%>' ></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

CodeCruiserCommented:
*No Points*
*Untested Code*

Try

<asp:TemplateField HeaderText="Business Phone">
                        <HeaderStyle Width="5%" />
                        <ItemStyle Width="5%" />
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                        <ItemTemplate>
                             <a href='<% string.format("tel:{0}", #Eval("BusinessPhone") %>'>'<%#Eval("BusinessPhone")%>'</a>
                        </ItemTemplate>
                    </asp:TemplateField>
0
RadhaKrishnaKiJayaAuthor Commented:
Thank you for ur reply. But it is not working. In this line I am getting an error.

'<% string.format("tel:{0}", #Eval("BusinessPhone") %>'

Near hash it says expression required. Please help.
0
Kyle AbrahamsSenior .Net DeveloperCommented:
'<%# string.format("tel:{0}", Eval("BusinessPhone") %>'
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RadhaKrishnaKiJayaAuthor Commented:
Thank u.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.