 |
BOOK: Professional ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Professional ASP.NET 4 in C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470502204 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 27th, 2012, 06:12 AM
|
Registered User
|
|
Join Date: Aug 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
regarding user controls
Sir
Getting problem in banner it is giving some parse error when i am writing it in web.config file.i have given the proper link of wrox:banner .....I dont know whats the exact problem
plzzz help...and sir you have written a wonderful book....i m a big fan of your books
Jaskaran
|

August 27th, 2012, 07:27 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Is this about Beginning ASP.NET or about Professional ASP.NET? In the former case, you find the book's own forum category here: http://p2p.wrox.com/book-beginning-asp-net-4-c-vb-560/
That said, can you post the code and the error message you get? Have you tried closing all documents or restarting VS?
Cheers,
Imar
|

August 27th, 2012, 07:33 AM
|
Registered User
|
|
Join Date: Aug 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
regarding user controls
sir,
it is giving a parse error and says that wrox is not suitable control
?xml version="1.0"?>
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="Wrox" tagName="banner" src="~/Controls/banner.ascx"/>
</controls>
</pages>
<compilation debug="false" targetFramework="4.0" />
</system.web>
</configuration>
this is what i m writing in config file
and i have deleted @directive from main file...everything is as per code you have give
yours sincerely
jaskaran
|

August 27th, 2012, 07:41 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Can you post the exact error message (right-click it and choose copy), as well as the full code for the page that uses this control?
If you post code, can you please paste it in Notepad first to remove color coding and then use the forum editor's Code toolbar button to wrap your code in code tags. Otherwise, this forum messes up the code.
Quote:
Have you tried closing all documents or restarting VS?
|
Have you? And did that help?
Cheers,
Imar
|

August 27th, 2012, 07:49 AM
|
Registered User
|
|
Join Date: Aug 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
regarding user controls
Sir,
Code:
I have tried closing visual studio..but it didnt help.
<?xml version="1.0"?>
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="Wrox" tagName="banner" src="~/Controls/banner.ascx"/>
</controls>
</pages>
<compilation debug="false" targetFramework="4.0" />
</system.web>
</configuration>
.................web.config file.............................................. ........................................
Code:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="banner.ascx.cs" Inherits="Site_Controls_banner" %>
<asp:Panel ID="VerticalPanel" runat="server">
<a href="http://www.google.com" target="_blank"> <asp:Image ID="Image1" runat="server" AlternateText="This is a simple banner"
ImageUrl="~/Images/36kv_xlpe (5).jpg" /></a>
</asp:Panel>
....................................banner.ascx file.............................................. ...............,,,
Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="banner.aspx.cs" Inherits="Site_banner" %>
<!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>banner</title>
</head>
<body>
<form id="form1" runat="server">
<div class="img" >
<Wrox:banner ID="banner1" runat="server" />
</div>
</form>
</body>
</html>
.....................banner.aspx.................. .................................................. ...................
|

August 27th, 2012, 08:09 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Not sure what's going on, but it looks like your site structure is not OK. Take a look at this:
Site_Controls_banner
See the Site_ prefix? That seems to suggest you openend C:\BegASPNET as the site, instead of C\BegASPNET\Site. This in turn could lead to issues like this, where ~/Controls is not where you think it is.
Can you post an image of your Solution Explorer online somewhere?
Cheers,
Imar
|

August 27th, 2012, 08:13 AM
|
Registered User
|
|
Join Date: Aug 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
regarding user controls
Sir
Thank you sir....the browser gives the error Unknown server tag 'Wrox:banner'.
jaskaran
|

August 27th, 2012, 08:19 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
Thank you sir....the browser gives the error Unknown server tag 'Wrox:banner'.
|
Sure. But did you see my last reply?
Imar
|

August 27th, 2012, 08:21 AM
|
Registered User
|
|
Join Date: Aug 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
regarding user controls
sir
yes i saw your last reply......i am working with this.can you give me the details of book you have written sir
???
yours sincerely
jaskaran
|

August 27th, 2012, 08:24 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
can you give me the details of book you have written sir
|
I don't understand what you mean with this. You have the book, don't you?
Imar
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
User Controls |
JBMarland |
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 |
3 |
March 24th, 2012 04:36 AM |
User controls' content: Chapter 2 User Controls |
AGS |
BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 |
10 |
July 26th, 2007 05:36 AM |
User Controls |
Duncan |
Pro VB.NET 2002/2003 |
2 |
December 1st, 2003 05:41 AM |
User Controls |
Duncan |
Pro VB.NET 2002/2003 |
1 |
October 27th, 2003 12:51 PM |
User Controls |
raZZa |
VS.NET 2002/2003 |
3 |
July 30th, 2003 07:36 AM |
|
 |
|