473,805 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hoe to prevent a control from being executed

bid
I have 2 controls on this page as shown below. The first
is a datalist control which contains links to the
particular image gallery (second control) I want to
display. However I only want the datalist to be used
when the page is *not* posted back. I know how to hide
the datalist control and prevent the databinding in the
code behind from being called if the page is not posted
back, but because the control contains code that is
executed at runtime is it not possible to ignore the
control?? Does this make sense?

Many Thanks,

BID
<asp:datalist id=dlVendors runat="server" CssClass="text" >
<ItemTemplate >

<%# Container.DataI tem("name")%>&n bsp;
<asp:LinkButt on ID="lnkbuttonGa llery"
CommandName="sh owGallery" CommandArgument ='<%#
Container.DataI tem("galleryFol der")%>' Runat="server"
onCommand="link Button_command" >View
Gallery</asp:linkbutton> <br />

<ul><li><%# Container.DataI tem
("description") %></li></ul>

</ItemTemplate>
</asp:datalist><B R>

<rebex:ImageGal lery id="imgGallery " runat="server" />
Nov 17 '05 #1
1 1590
Bid,

One solution is to put the control you want to hide within a panel control
and set the visbilty of the panel control to false.

Reddy
"bid" <bi****@hotmail .com> wrote in message
news:00******** *************** *****@phx.gbl.. .
I have 2 controls on this page as shown below. The first
is a datalist control which contains links to the
particular image gallery (second control) I want to
display. However I only want the datalist to be used
when the page is *not* posted back. I know how to hide
the datalist control and prevent the databinding in the
code behind from being called if the page is not posted
back, but because the control contains code that is
executed at runtime is it not possible to ignore the
control?? Does this make sense?

Many Thanks,

BID
<asp:datalist id=dlVendors runat="server" CssClass="text" >
<ItemTemplate >

<%# Container.DataI tem("name")%>&n bsp;
<asp:LinkButt on ID="lnkbuttonGa llery"
CommandName="sh owGallery" CommandArgument ='<%#
Container.DataI tem("galleryFol der")%>' Runat="server"
onCommand="link Button_command" >View
Gallery</asp:linkbutton> <br />

<ul><li><%# Container.DataI tem
("description") %></li></ul>

</ItemTemplate>
</asp:datalist><B R>

<rebex:ImageGal lery id="imgGallery " runat="server" />

Nov 17 '05 #2

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

Similar topics

20
2896
by: modemer | last post by:
Question is as in subject. For example: class BaseClass { public: void func() { do something; } // I don't want this function being overloaded in its inherited class };
3
1696
by: Tony Maresca | last post by:
Hi. I have a class derived from a UserControl, that I want to allow others to derive controls from. I don't want them to design the base class (which is derived from a UserControl). I know that I can prevent the control from being designed by making it not the first class in the code file, but is there another more 'official' way to do this via attributes.
3
3237
by: Ryu | last post by:
Hi, May I know how to prevent Javascript from being dlownloaded when the user saves at "View Source"? I have added "js" at IIS's application configuration's mapping and i have added the following at web.config: But the javascript is still being downloaded. Please help <httpHandlers> <add verb="*" path="../ig_common.js" type="System.Web.HttpForbiddenHandler"/>
1
2432
by: Stephen Adam | last post by:
Hi there, I have written a custom validation control which checks to see of an input field is not empty and contains only numeric data. I was using a regular expression validation control but was unable to get it fail if a field was blank. My problem now is that while my custom validation control will detect if a field matches my requirement and will display a error message if it doesnt, it wont stop it from being used and sent to my...
7
8829
by: Fabio Cannizzo | last post by:
How can I prevent a few lines of code contained in the constructor of a Form from being executed by the Designer? Thanks, Fabio
5
3405
by: EqDev | last post by:
I have a class that is a control derived from UserControl. I want to use serialization and deserialization with this calss but I get an exception "Cannot serialize member System.ComponentModel.Component.Site of type System.ComponentModel.ISite because it is an interface.". I am not interested in serializing any member from the base class only the properties in the derived class. How can I prevent the entire base class from being...
3
1970
by: sowencheung | last post by:
I attach an Event in document.onkeyup and another event in document.onbeforeunload in onkeyup event, if the condition is satisfied, i will activate sth, then i don't want the onbeforeunload event to happen. is it possible to accomplish this? thanks!
10
5144
by: goscottie | last post by:
Hi, Simply put, I have a control in MasterPage and another in content. When the control in content fires off post back, MasterPage also runs and returns post back. I want to control these where post back happens in respected area, within content or within MasterPage. What will be the simplest and logical way to implement this? TIA.
3
1416
by: Qu0ll | last post by:
In browsers which utilise a JIT JavaScript compiler, are there any factors that may prevent a script from being compiled before it is executed? I don't see any reason why this would be so but I would like to check that scripts that access Java classes & methods and/or scripts which are loaded dynamically using AJAX will both be valid candidates for jittering. -- And loving it, -Qu0ll (Rare, not extinct)
0
9716
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
9596
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
10609
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10360
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...
1
7646
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...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4323
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
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
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.