No Themes being recognised in web page - asp.net

I have a basic website with two themes.
But No Themes being recognised in the web page.
Error: Warning 1 Invalid theme or stylesheet theme value. C:\Visual Studio 2010\WebSites\ThemesLab\Default.aspx 1 17 C:...\ThemesLab\
code:
<%# Page Theme="Fabrikam" Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:Image ID="Image1" runat="server" SkinID="Logo" />
<asp:TextBox ID="TextBox1" runat="server" CssClass="textBox"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Hello" CssClass="button" />
</asp:Content>
Any idea how to get it to work?
It seems to be on and off.
Will monitor it over the weeks ahead

Related

ajax controls are not working in asp.net

I am trying to put a calender extender in my aspx page but it is not working and showing no error, but when i try to do this at another project so its working.
what is the problem with my current page ? plz help me.
my code is .......
below is my code
<%# Page Title="" Language="C#" MasterPageFile="~/site.Master" AutoEventWireup="true" CodeBehind="Add Tax.aspx.cs" Inherits="HMS.Add_Tax" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<tr>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
<td class="auto-style2">Applies From</td>
<td class="auto-style10">
<asp:TextBox ID="txtdate" runat="server"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtdate" PopupButtonID="txtdate" Format="dd/MM/yyyy" Enabled="true">
</asp:CalendarExtender>
</td>

What does <asp:Content> error mean in asp.net Master page?

I am getting the Content controls error in my Master page. I did not leave any tag opened but still getting this error. Can somebody look at my code and point me to my mistake for correction? Can somebody explain me the error via this example?
<%# Master Language="C#" MasterPageFile="~/Data.master" AutoEventWireup="true" CodeFile="IMS.master.cs" Inherits="ims_IMS" %>
<%# MasterType VirtualPath="~/AData.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contenttop" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="content" Runat="Server">
<div id="section-header" class="clear">
<h2 id="section-title">IMS </h2>
</div>
<de:PageSecurity ID="ps1" runat="server" ContentControlId="contentwrapper" AllowdeStaff="True" AllowTechss="False" AllowPeoples="False" AllowDistrict="True" ErrorMessage="You cannot access this page." />
<div id="section-content">
<asp:ContentPlaceHolder ID="sectioncontent" Runat="Server">
</asp:ContentPlaceHolder>
</div>
</asp:Content>
I'd recommend you remove everything from inside <asp:Content ID="Content3" and see if you still get an error.
Also, try ending your custom control with /> instead of /de>
<asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown"></asp:scriptmanager>
<asp:button id="Button1" runat="server" onclick="Button1_Click" text="Button" xmlns:asp="#unknown" />
<rsweb:reportviewer id="ReportViewer2" runat="server" height="261px" width="476px" xmlns:rsweb="#unknown"></rsweb:reportviewer>

I can't get a Modal Window to work! I tried every tutorial I can find

I've followed all tutorials exactly (or so I think) and I can't get a modal window to open. Right now, I'm just trying to get one to open in a "test" ASP page, so I can figure out the functionality.
Here is my code for "Test.aspx"
<%# Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="act"%>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<act:ModalPopupExtender ID="MPE" runat="server"
TargetControlID="LinkButton1"
PopupControlID="Panel1"
OkControlID="OkButton"
BackgroundCssClass="modalBackground"></act:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server" CssClass="ModalWindow">
<asp:Table Width="100%" runat="server">
<asp:TableRow>
<asp:TableCell>
Fields1:
</asp:TableCell>
<asp:TableCell><asp:TextBox ID="txtFields1" runat="server">
</asp:TextBox>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<asp:Button ID="Button1" runat="server" Text="Submit" />
<asp:Button ID="btnCancel3" runat="server" Text="Cancel" />
</asp:Panel>
<asp:Button ID="LinkButton1" runat="server" Text="Link Button" />
I also put this at the top of Site.Master
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
The error I am getting is this:
http://i.stack.imgur.com/4gCvF.png
If I click to ignore the error, this is what happens
http://i.stack.imgur.com/D0f1k.png
OkControlID="OkButton"
should match the submit button
<asp:Button ID="Button1" runat="server" Text="Submit" />
To close the modal window. You currently don't have a button with the ID "OkButton"
EDIT:
Also, you want to use
<asp:ToolkitScriptManager ID="ScriptManager1" runat="server" > </asp:ToolkitScriptManager>
instead of
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
(or in your case I think you want to use <act:ToolkitScriptManager... but I'm not a pro so play with it)
Note: I figured this out a few days ago, and I had to add the attribute CombineScripts="false" to the ToolkitScriptManager to get it to work, but I think this depends on your environment and what other javascript files you have running

Ajax calender is not popping up...:-(

<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:ImageButton ID="imgCal" runat="server" ImageUrl="~/Images/calender.png"/>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox2" PopupButtonID="imgCal" >
</asp:CalendarExtender>
</div>
</form>
the same code works on different machine, but mot in mines,
any code for this is appreciated..
thanks in advance for any suggestion..
Your code works fine in my machine. Just remove ajax control dll and add latest ajaxcontrol toolkit to your project.
Replace ScriptManager with ToolkitScriptManager.

Compiles fine but have problem publishing whit updatable option

I have a web site developed on VS2005. that compiles fine.
But when i try to publish it whit the "Allow this web site to be updatable" i get the following compiller error:
error BC30002: The type 'ASP.ucDireccion' is not defined.
The problem seams to be related to a user control im accesing its public properties and methods.
I have the user control on the page and have also put the <#register> directive on the page.
here is the relevant code where te compiler indicates the errors
- Private Sub CargarDireccionAControl(ByVal ctrlDireccion As ASP.ucDireccion)
- Dim ctrl As ASP.ucDireccion = CType(Me.pnl_AdicionarSolicitudes.FindControl(id_Control), ASP.ucDireccion)
and several others
Here are the relevant parts of the ASPX page:
<%# Page EnableEventValidation="false" Language="VB" MasterPageFile="~/Principal.master"
AutoEventWireup="false" CodeFile="AV_SolicitudVerificacion.aspx.vb" Inherits="Verificaciones_AV_SolicitudVerificacion"
Title="Untitled Page" %>
<%# Register Src="wucMapa.ascx" TagName="wucMapa" TagPrefix="uc2" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%# Register Src="../UserControls/ucDireccion.ascx" TagName="ucDireccion" TagPrefix="uc1" %>
<%# Reference Control="../UserControls/ucDireccion.ascx" %>
<%# MasterType VirtualPath="~/Principal.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<ContentTemplate>
<asp:UpdatePanel ID="up_Solicitudes" runat="server">
<ContentTemplate>
...
...
...
<cc1:CollapsiblePanelExtender ID="cpeMapa" runat="server" Collapsed="True" TargetControlID="pnl_mapa">
</cc1:CollapsiblePanelExtender>
<asp:Panel ID="pnl_mapa" runat="server" BorderColor="WhiteSmoke" ForeColor="Black" BackColor="White" BorderStyle="Solid" HorizontalAlign="Center">
<uc2:wucMapa ID="wucMapa1" runat="Server" />
<asp:Button ID="bt_CancelarMapa" CssClass= "boton_azul" runat="server" CausesValidation="False" Text="Cancelar" OnClick="cancelarSolicitud"/></asp:Panel>
<uc1:ucDireccion ID="ucSolicitudDomicilio1" runat="server" TipoSolicitud="Domicilio"
Visible="false" />
<uc1:ucDireccion ID="UcSolicitudTrabajo1" runat="server" TipoSolicitud="Trabajo"
Visible="false" />
<uc1:ucDireccion ID="UcSolicitudTrabajo2" runat="server" TipoSolicitud="Trabajo"
Visible="false" />
<uc1:ucDireccion ID="UcSolicitudTrabajo3" runat="server" TipoSolicitud="Trabajo"
Visible="false" />
<uc1:ucDireccion ID="UcSolicitudTrabajo4" runat="server" TipoSolicitud="Trabajo"
Visible="false" />
<uc1:ucDireccion ID="UcSolicitudTrabajo5" runat="server" TipoSolicitud="Trabajo"
Visible="false" />
</ContentTemplate>
</asp:UpdatePanel>
...
...
the user control relevant parts
<%# Control className="ucDireccion" Language="VB" AutoEventWireup="false" CodeFile="ucDireccion.ascx.vb" Inherits="ucDireccion" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
...
...
You should note that when i unchek the "Allow this web site to be updatable" option of the publish dialag. it works fine.
Thanks very much for your time
Regards Hugo
Why is this line:
<%# Reference Control="../UserControls/ucDireccion.ascx" %>
surrounded with **?
What happens when it's included first thing in the page or just after the #Page directive? I'd say that putting it may solve the problem.
Also check this post if you haven't already:
http://rbgupta.blogspot.com/2007/06/turning-ascx-user-control-into.html

Resources