- - PR -
ASP.NETでistyle属性をつけたい
1
投稿者 | 投稿内容 | ||||
---|---|---|---|---|---|
|
投稿日時: 2003-10-27 16:12
お世話になります。
ASP.NET(VB.NET)のモバイル開発で、TextBoxのWebフォームに"istyle"属性をつけたいと思っております。 ネットでの検索やヘルプから以下のようにしてみたのですが、どうしてもistyleがつきません。。 設定が足りないのか間違えているということなのでしょうか?? 【環境】 Visual Studio .NET 2003(FrameWork1.1) Device Update 3.0 【Web.configへの追加】 <mobileControls allowCustomAttributes="True" /> <deviceFilters> <filter name="i-mode" compare="SupportsInputIStyle" argument="True" /> </deviceFilters> 【aspxファイルへの追加】 <mobile:TextBox id="textbox1" runat="server"> <DeviceSpecific> <Choice Filter="i-mode" istyle="2"> </Choice> </DeviceSpecific> </mobile:TextBox> aspxファイルでは、以下の方法でも試しましたが、だめでした。 <mobile:DeviceSpecific id="DeviceSpecific1" runat="server" istyle="2"> <Choice Filter="i-mode"></Choice> </mobile:DeviceSpecific> <mobile:TextBox id="textbox1" runat="server"></Mobile:TextBox> どうぞ、よろしくお願い致します。 [ メッセージ編集済み 編集者: やす 編集日時 2003-10-27 21:23 ] [ メッセージ編集済み 編集者: やす 編集日時 2003-10-27 21:23 ] | ||||
|
投稿日時: 2004-10-19 20:28
私も以前から、この問題に躓いています。
Page_Load で次のようなのも試しましたが、だめでした。 this.AllowCustomAttributes = true; this.txtFurigana.CustomAttributes.Add("iSTYLE", "2"); もしかして、.Net framework or mobile internet toolkit に問題があるのかしら? | ||||
|
投稿日時: 2004-10-20 01:47
南部です。
まったく畑違いですので、的外れかもしれません。
ここで使用しているTextBoxにistyle属性はありますか? System.Web.UI.MobileControls.TextBoxにはないですよね? #Device Update 3.0だとあるのかな? なければ、 上記クラスを継承し拡張したコントロールを作成する ような感じがしますが。 | ||||
|
投稿日時: 2004-10-27 11:11
私は
System.Web.UI.MobileControls.TextBox を継承したカスタムコントロールを作成して Renderメソッドで以下の様に Textタグを直接書いています。 Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter) Dim tag as String = "<input type=text name=text1 istyle=2>" output.Write(tag) End Sub カスタムコントロールを自在に操れると かなり色々できますよ。 |
1