473,387 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1266
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 "StyleSheetTheme". 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
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
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...
8
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...
2
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...
1
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...
1
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...
2
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...
11
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...
2
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.