473,671 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Databinding in Skins causes trouble in VS 2005

Hi,

I want to skin the templates of an asp:DataList. So I have to do data
binding in the skin (I didn't find another comfortable way to do
that). As soon there's a <%# ... %tag in the skin, VS seems not to
recognize the skin file anymore. The property editor displays SkinID
grayed out, and I cannot select anything.
Interestingly, I can enter the SkinID by hand, and page rendering
actually works!

Of course, separation of code and layout is lost when doing
databinding in the skin. I'd like to avoid that, but how can I skin
the DataList's templates and do databinding directly on the control?
As soon as my DataList skin contains an ItemTemplate, any databinding
is lost.

Btw.: Is it normal that VS does not apply the skin in the designer? I
have to open the page in a browser to see the results. Forther more,
inellisense does not work in skin files.

Kind regards, Sebastian

Jun 22 '07 #1
2 1278
Hi Sebastian,

I don't think you can use binding expression for SkinID because this
property can only be set in PreRender event or (your case) before control is
added to the tree (databinding takes place after template is fully created).

--
Milosz
"Sebastian" wrote:
Hi,

I want to skin the templates of an asp:DataList. So I have to do data
binding in the skin (I didn't find another comfortable way to do
that). As soon there's a <%# ... %tag in the skin, VS seems not to
recognize the skin file anymore. The property editor displays SkinID
grayed out, and I cannot select anything.
Interestingly, I can enter the SkinID by hand, and page rendering
actually works!

Of course, separation of code and layout is lost when doing
databinding in the skin. I'd like to avoid that, but how can I skin
the DataList's templates and do databinding directly on the control?
As soon as my DataList skin contains an ItemTemplate, any databinding
is lost.

Btw.: Is it normal that VS does not apply the skin in the designer? I
have to open the page in a browser to see the results. Forther more,
inellisense does not work in skin files.

Kind regards, Sebastian

Jun 22 '07 #2
Hi,

I just want to add that VS only shows the skin if it has been set up
as "StyleSheetThem e". Before, I set up a "Theme", what seems to have a
quite other meaning. As I understood, StyleSheetTheme is applied very
early in the processing pipeline, while Theme applies later and may
override the StyleSheetTheme .

Intellisense works in Skin files, if you map a certain editor to the
file extension. This can be done in Tools->Options->Text-Editor->File
Extension. Just add "User Control Editor" for the "skin" extension.
VS sometimes worries that there's no build provider for that
extension, but this has no effect.

Kind regards, Sebastian

Aug 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1546
by: Stefano | last post by:
Hi all, can you link me to a directory that contains ready-to-use .Text/Community Server Skins? I'm looking for a XHTML Skin, using table-less layout. Thank you so much! Bye --
3
7754
by: Alec MacLean | last post by:
Hi everyone, I have a ComboBox that when changed, calls a method to change the content of a ListBox. I'm also using the Listbox's SelectedIndexChanged event to change other control values on the form. (It's a Company -> People -> Personal Data relationship) When I bind my datasource to the ListBox, I find that the
8
2175
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got answered... In 1.1 we always did our own myDataAdapter.fills and we liked that control for lots of good reasons. Now the new DataSource (or is it a TableAdapter:Dataset) automatically fills the Gridview. How can we control that fill? In a...
2
4261
by: John R. Lewis | last post by:
I posted this yesterday with a different email address. I am reposting with my fake-address as given to me by Microsoft so that I can be guraranteed a response from a support representative. Sorry for the repost. I'd like to make use of the asp:Wizard control to present a step-by-step guided experience for my user to fill out a complicated data-entry form. I'd like to make use of two-way databinding provided by the asp:FormView control...
1
1504
by: Jerad Rose | last post by:
I must be missing something, because this seems like it should be so obvious (and maybe it is). All I'm trying to do is create various skins for my site, with each skin containing a list of 30 some odd static images. In my page, I want to set the skin for the page, and then each image to be loaded from that skin's folder. That's all. For example, my page might look something like this:
1
16245
by: Owen Blacker | last post by:
I've spent loads of time Googling to try to work this one out and I'm sure it's something obvious. I get an InvalidOperationException reading "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control" when I start my page. Unless I'm missing something obvious, this is *not* the same issue as the "2-way databinding cascading lists" issue in...
2
6127
by: hwiechers | last post by:
I have two drop down lists on a page. Each one is hooked up to a separate SqlDataSource. The second data source has a ControlParameter set to the selected value of the first drop down. When I set the SelectedValue of the first drop down in Page_Load, the DataBinding event of the second fires twice. This causes the second drop down to have duplicate values. Try as I might I haven't been able to get this to work. Does anyone have a solution...
11
6610
by: New Bee | last post by:
Hi, I have been looking at Themes and Skins today and now resonably understand how they work at a ground level. But I have a couple of questions. 1. ) StyleSheetTheme I dont understand where this would be used. As I understand it the precidence is like this.
2
1764
by: mike | last post by:
Hi. I am having trouble grasping the concept of applying a consistent theme to an ASP.net website. I didn't used to like ASP because it was too hard to apply a theme from a common theme folder like I could do easily in PHP, but now I see that it has some nicer theming features and master files. So I want to use web.config to switch which theme I'm using, and I want to be able to have several themes. My understanding of themes is that I...
0
8476
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7437
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6229
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2812
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.