本文介绍了如何在文本框上绑定国家/地区代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MVC 5,其中包含View页面,



 <   pre  >  @ Html.TextBoxFor(model => model.MobileNumbers ,new {Name =MobileNumbers,@ id =iduserMobile,@ class =form-control input-sm,@ placeholder =Mobile Number,@ maxlength =15})





文本框视图如下图所示,

[]



我尝试过:



如何在从drowpdown选择Country改变之后绑定文本框内的国家代码(例如:'+ 91')?



这是DB表结构图,

[]



我该怎么办这个?

解决方案

I am working on MVC 5, there is View page that contain,

<pre>@Html.TextBoxFor(model => model.MobileNumbers, new { Name = "MobileNumbers", @id = "iduserMobile", @class = "form-control input-sm ", @placeholder = "Mobile Number", @maxlength = "15" })



Textbox view is as Image shown below,
[^]

What I have tried:

How can I bind Country code inside the textbox (eg: '+91') after select Country from drowpdown change?

Here is DB table structure image,
[^]

How can I do this?

解决方案


这篇关于如何在文本框上绑定国家/地区代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 16:30