Bilal Bilal - 1 month ago 17
CSS Question

how to apply bootstrap on this code can anybody help me

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="BusinessWiseStoresUserControl.ascx.cs" Inherits="BusinessWiseStoresUserControl" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<div id="LoginStoreInfo" class="ModelPopupPanel">
<div class="ClosePopupButtonStyle">
<%--<asp:ImageButton ID="ClosePreSaveDialogImageButton" runat="server" Height="22px" Width="27px"
ImageUrl="~/Images/CloseButton.png" onclick="ClosePreSaveDialogImageButton_Click"/>--%>

<asp:ImageButton ID="ClosePreSaveDialogImageButton" runat="server" ImageUrl="/Images/CloseButton.png" Height="22px" Width="27px" onclick="ClosePreSaveDialogImageButton_Click" onmouseover="this.src='/Images/CloseButton1.png'" onmouseout="this.src='/Images/CloseButton.png'"/>
</div>
<table class="spacing-table">
<tr>
<td>
<label>Select Store</label> </td>
<td><asp:DropDownList ID="StoresDDL" runat="server" CssClass=" MediumDDLStyle" Height="30px"/>
<asp:RequiredFieldValidator ID="StoreRequiredFieldValidator"
runat="server" ControlToValidate="StoresDDL" Display="Dynamic" InitialValue="0"
Text="<img src='Images/Exclamation.gif' title='Please select a Store!' />"
ErrorMessage="Please select a Store" ToolTip="Please select a Store"
ValidationGroup="LoginGrp"/>
</td>
<td>
<asp:LinkButton ID="LoginWithStoreLinkButton" CssClass="btn btn-primary"
runat="server" ValidationGroup="LoginGrp"
onclick="LoginWithStoreLinkButton_Click" >OK</asp:LinkButton>
</td>
</tr>
</table>
</div>
<cc1:ModalPopupExtender BackgroundCssClass="modalBackground" OkControlID="ClosePreSaveDialogImageButton"
CancelControlID="ClosePreSaveDialogImageButton" runat="server" PopupControlID="LoginStoreInfo"
id="LoginStoreInfoModalPopupExtender" TargetControlID="LoginStoreInfoPopupLinkButton" />
<asp:LinkButton ID="LoginStoreInfoPopupLinkButton" runat="server" Text=""/>


`

Answer

Add the Bootstrap.css and bootstrap.js files to your project. In your .aspx file in head section add

<link href="/bootstrap.css" rel="stylesheet" />