I've just created a label in default.aspx page and created a skin in skinfile.skin. I've put the skin file in App_Themes folder, i've included the reference to that file in the < link > tag and i've mentioned the skin id for that label.
so according to the code, the label should have background as black and text as orange, right? But nothing's happening.
What i'm doin wrong here?
Here's the code:
Default.aspx:
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link rel="stylesheet" type="text/css" href="App_Themes/SkinFile/SkinFile.skin" />
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Label" SkinID="LabelSkin"></asp:Label>
</div>
</form>
</body>
</html>
SkinFile.skin:
<asp:Label runat="server" SkinID="LabelSkin" BackColor="Black" Color="Orange">
</asp:Label>
i got this thing fixed. all i had to do was set the 'theme' attribute in the <%# Page.... Theme= "SkinFile" %> statement as the name of the folder in which the skin file is... ^_^
Related
I have a user control in my project (asp.net) that have an image. It has below code:
<%# Control Language="C#" ClassName="Header" %>
<asp:Panel ID="Panel1" runat="server">
<img alt="The Night Owl"
src="../Images/bookshelf.jpg"
width="800" height="110"/>
</asp:Panel>
<asp:Panel id="menuPanel" runat="server">
Home |
Titles |
Authors |
Publishers
</asp:Panel>
I can see image in user control but when i use it in my default.aspx page, it do not show image. my default.aspx code is:
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%# Register src="~/controls/Header.ascx" tagname="Header" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>The Night Owl</title>
<link href="styles.css" rel="Stylesheet" type="text/css"/>
</head>
<body>
<form id="form1" runat="server">
<uc1:Header ID="Header1" runat="server" />
<h1><span lang="en-us">Home Page</span></h1>
<asp:Panel runat="server">
Welcome to The Night Owl, where all of
your technical needs are met!
</asp:Panel>
</form>
</body>
</html>
Because of src="../Images/bookshelf.jpg" in the default.aspx page it can not be load, user controls dont reference images well unless you specify the whole path or the page and user control are in the same folder,
Your UC is in a sub folder but Default page not,
Change the src something like ~/subf/subf1/img.jpg.
If that page and UC are in a same folder your src will work.
But if they are not in the same folder you should change src as I mentioned.
There is something about Path.
i added ajax combo box to my page, but i have 2 problems.
1- i can not type in that.
2- when i type in that , it automatically find matched words.
for example when i type "j" , it finds "jack".
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%# Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ComboBox ID="ComboBox1" runat="server" AutoCompleteMode="SuggestAppend"
DropDownStyle="DropDownList"
style="display: inline;">
<asp:ListItem>masoud</asp:ListItem>
<asp:ListItem>jack</asp:ListItem>
</asp:ComboBox>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
Is your browser Firefox? If so, you may have to change the MaxLength property of the ComboBox control to a value other than the default 0.
This link will show you how to use all of the ajax controls, look at the combo box one. And you can see which one you need then.
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ComboBox/ComboBox.aspx
That is a link to all of the ajax controls with samples.
as #CallumHolden said.. if you will set the dropdownstyle property to dropdown rather than dropdownlist it will work. this solved my problem as well.
How could I add a tooltip to a ext:FileUploadField control? I tried to assign a ToolTip for my Browse button like the below, but it's not working.
<ext:FileUploadField ID="FileUpload1" runat="server" Icon="BrowsePicture" ButtonText="" ButtonOnly="true" AutoPostBack="true">
<ToolTips>
<ext:ToolTip runat="server" ID="FileUpload1_TT" Title="Browse" Html="Browse"></ext:ToolTip>
</ToolTips>
<Listeners>
<FileSelected Fn="showFile" />
</Listeners>
</ext:FileUploadField>
You can set Target="#{FileUpload1}-file" on the <extTooltip>.
The following example demonstrates the full scenario.
Example
<%# Page Language="C#" %>
<%# Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET Example</title>
</head>
<body>
<ext:ResourceManager runat="server" />
<form runat="server">
<ext:FileUploadField ID="FileUpload1" runat="server" ButtonOnly="true" ButtonText="Select">
<ToolTips>
<ext:ToolTip runat="server" Title="Browse" Html="Browse" Target="FileUpload1-file" />
</ToolTips>
</ext:FileUploadField>
</form>
</body>
</html>
Wrapping the string FileUpload1 with #{} will ensure the client-side .ID (.ClientID) is used to reference the correct instance of the <ext:FieldUploadField> object.
Hope this helps.
i am using vb-2008 to create my application. i created master page in asp but i am not able to use it on other pages. i used :
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" MasterPageFile="~/Mail.Master" Inherits="webform1._Default" %>
i created master page as:
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Mail.master.cs" Inherits="master1.Mail" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="MainContent" runat="server">
<asp:Image ID="imghead" runat="server" ImageUrl="~/images/images1.jpeg" />
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
but this is not showing master page on other page where it is implemented..
how can i implement the master page..
Now you need to create ASPX pages that have the masterpage assigned and fill up the content placeholders
your new page called, for example, default.aspx will contain:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" MasterPageFile="~/Mail.Master" Inherits="webform1._Default" %>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
<!-- Add code here to add to the HeadContent section -->
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="MainContent" runat="server">
<!-- Add code here to add to the MainContent section -->
<asp:Image ID="imghead" runat="server" ImageUrl="~/images/images1.jpeg" />
</asp:ContentPlaceHolder>
A MasterPage only holds the PlaceHolders for where other pages will inject content.
There is a hole Video on MasterPages that you can see here:
ASP.NET WebForms Part 5: MasterPages
i trying to add some costume app into Dynamics CRM
basically i have an ASP.Net Page i show within an iframe inside the MS CRM.
when i try to do a submit using a button it opens a new window and shows the result there, i want it to stay in the iframe.
help.
this is the ASP.Net code:
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server" target="_self">
<asp:Calendar ID="FromCalendar" runat="server"></asp:Calendar>
<asp:Calendar ID="ToCalendar" runat="server"></asp:Calendar>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
<asp:GridView ID="GridView1" runat="server" />
</form>
</body>
</html>
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/bdf52a59-5751-4ada-8704-056bfec5e625