2013-05-16 23 views
0

我不是aspx編碼器,而是嘗試在使用Telerik和Bootstrap的aspx頁面上設置樣式按鈕。 因此,代碼是這樣的,使用Bootstrap編輯Telerik中的按鈕樣式

<telerik:RadButton CssClass="btn btn-primary" ID="rbtnGiris" runat="server" Text="Giriş" OnClick="rbtnGiris_Click" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false"> 
</telerik:RadButton> 

並呈現HTML是如下,

<a href="javascript:void(0)" class="RadButton RadButton_Default rbSkinnedButton" id="rbtnGiris"> 
<input type="submit" value="Giriş" id="rbtnGiris_input" name="rbtnGiris" class="btn btn-primary" tabindex="-1"> 
<input type="hidden" name="rbtnGiris_ClientState" id="rbtnGiris_ClientState" autocomplete="off"> 
</a> 

所以你可以猜到按鈕看起來不正確的,因爲它的目標是一個「a」元素。我找不到如何正確更改它。

任何人都有一個想法如何操縱可愛的Telerik外觀?讓,我知道這需要任何.NET編程技巧或Visual Stuido,因爲我給它,我用記事本+ + :)

Thanx提前

+1

你正在使用單選按鈕上的普通按鈕css類,它不會真正產生所需的結果。此頁面顯示其價值可能太大:https://groups.google.com/forum/#!msg/twitter-bootstrap/KIwM_-T461o/WDWXVhooOcwJ – adaam

回答

0

編輯.aspx頁,我不知道究竟你想要實現,但是我發現你已經禁用了控件附帶的嵌入式皮膚和樣式表,所以你不能期望它看起來應該如此。嘗試設置EnableEmbeddedSkins =「true」EnableEmbeddedBaseStylesheet =「true」然後看看情況如何。

然後,如果您需要進一步對控件進行樣式設置 - 請使用標準HTML元素,這會使您更輕鬆(您不必覆蓋供應商的自定義CSS規則),或者查看這篇文章類在RadButton中:http://www.telerik.com/help/aspnet-ajax/button_appearancecssfileselectors.html