473,698 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CheckedListBox in asp.net

Hi.

I have read some articles about hosting windows forms controls on asp.net
pages but all of them show how to use custom controls. I would like to show
on one of my pages the checkedlistbox windows control. I believe that the
steps are the same, but what do I need to reference in my <object> tag in
order to acomplish this?

TIA,
Erik Cruz
Nov 18 '05 #1
2 2177
you don't need to mess with the object tag because you may have a type
entering the clsid. Just drag the windows control unto the form. Studio (if
that's what you are using) will automatically fill in the blanks. I am
assuming you have the rest setup correctly
here's what the code should look like for a slider web control added on to a
form. the object tag is below
[ComSourceInterf aces (typeof(IWebSli derEvents))]

public class WebSlider : System.Windows. Forms.TrackBar{ }

[InterfaceType (ComInterfaceTy pe.InterfaceIsI Dispatch)]

public interface IWebSliderEvent s

{

//[DispId (1)] void SizeChanged (object sender, EventArgs e);

[DispId (1)] void Scroll(object sender, EventArgs e);

}

//object
<OBJECT id="Slider" style="Z-INDEX: 101; LEFT: 160px; WIDTH: 160px;
BORDER-TOP-STYLE: outset; BORDER-RIGHT-STYLE: outset; BORDER-LEFT-STYLE:
outset; POSITION: absolute; TOP: 152px; HEIGHT: 16px; BORDER-BOTTOM-STYLE:
outset"
classid="clsid: F08DF954-8592-11D1-B16A-00C0F0283628" VIEWASTEXT>

</OBJECT>
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Erik Cruz" <er************ ******@antares. com.br> wrote in message
news:e2******** ******@tk2msftn gp13.phx.gbl...
Hi.

I have read some articles about hosting windows forms controls on asp.net
pages but all of them show how to use custom controls. I would like to show on one of my pages the checkedlistbox windows control. I believe that the
steps are the same, but what do I need to reference in my <object> tag in
order to acomplish this?

TIA,
Erik Cruz

Nov 18 '05 #2
Hi Alvin.

I created the control and added it to my toolbox. However, the control
appears grayed out in my toolbox and I can't drag it to my web form. Is it
the default behaviour? How can I turn it available in my toolbox?

TIA,
Erik Cruz

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:Ou******** ******@TK2MSFTN GP09.phx.gbl...
you don't need to mess with the object tag because you may have a type
entering the clsid. Just drag the windows control unto the form. Studio (if that's what you are using) will automatically fill in the blanks. I am
assuming you have the rest setup correctly
here's what the code should look like for a slider web control added on to a form. the object tag is below
[ComSourceInterf aces (typeof(IWebSli derEvents))]

public class WebSlider : System.Windows. Forms.TrackBar{ }

[InterfaceType (ComInterfaceTy pe.InterfaceIsI Dispatch)]

public interface IWebSliderEvent s

{

//[DispId (1)] void SizeChanged (object sender, EventArgs e);

[DispId (1)] void Scroll(object sender, EventArgs e);

}

//object
<OBJECT id="Slider" style="Z-INDEX: 101; LEFT: 160px; WIDTH: 160px;
BORDER-TOP-STYLE: outset; BORDER-RIGHT-STYLE: outset; BORDER-LEFT-STYLE:
outset; POSITION: absolute; TOP: 152px; HEIGHT: 16px; BORDER-BOTTOM-STYLE:
outset"
classid="clsid: F08DF954-8592-11D1-B16A-00C0F0283628" VIEWASTEXT>

</OBJECT>
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Erik Cruz" <er************ ******@antares. com.br> wrote in message
news:e2******** ******@tk2msftn gp13.phx.gbl...
Hi.

I have read some articles about hosting windows forms controls on asp.net pages but all of them show how to use custom controls. I would like to

show
on one of my pages the checkedlistbox windows control. I believe that the steps are the same, but what do I need to reference in my <object> tag in order to acomplish this?

TIA,
Erik Cruz


Nov 18 '05 #3

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

Similar topics

0
4560
by: Matt C. | last post by:
Does the CheckedListBox support DisplayMember/ValueMember? I have been trying to use these properties with the CheckedListBox and they are not working. I see from Google that databinding is not supported on this control. Ok, fine. I tried to work around this by using DictionaryEntries, which still didn't work (see code below). Now I see in VS Help that DM/VM are not even listed as properties of the CheckedListBox (they are in VS...
4
3737
by: Reza | last post by:
Hi, I want to check one of the memebrs of a checkedListbox based on its value. I 'm getting a number(say 1355) from another control and based on that number I want to check an item which its value is 1355,how can I do that? thannks.
1
6010
by: xiuyu_0129 | last post by:
Hi All, How do I store a string value for an item in a CheckedListBox in Windows Form? For a web based application, CheckBoxList allowed us to store 2 string values for the item in it. How do I achieve that when making use of the CheckedListBox in windows form. Thanks.
4
3787
by: Matthew | last post by:
Hi, I am using a checkedlistbox on a windows form and binding it to a collection of classes. clbAliases is the checkedlistbox control selectedplace is a class with property placealiases.This property is a collection of placealias classes. Hopefully the rest is self-explanatory..
2
2414
by: CC | last post by:
Hi, We are populating a CheckedListBox from a database. Based on a selection by the user, the CheckedListBox either contains ALL possible members of a set, or a subset of possible members. The user can click a button to toggle back-and-forth between showing all or some. The question we have is maintaining state of the CheckedListBox. In other words, if a user has selected "Show MY records" and checks a few boxes, then selects "Show ALL...
8
1801
by: Derek Martin | last post by:
Here is some code that I need help with please: Dim result As New ArrayList Try For i = 0 To objecttest1.PersonList.person_returnnumber - 1 result = objecttest1.PersonList.time_returnpunches(objecttest1.PersonList.person_getb yid(i).userid, "03/08/2004", "03/09/2004", True, False) 'The above line returns an object with several proerties, namely, a punch id that I want to be able to get out of the checkedlistbox collection:
2
2299
by: Manuel Canas | last post by:
Hi there, I'm having this dilema with a checkedlistbox. I have an array of items in there, what I want to accomplish is the following; The user could check all the items in the checkedlistbox, but always have at list one item always checked. so if the user has the last item checked and he/she wants to uncheck it, the item should reset it self to a checked state
0
1711
by: Terry Olsen | last post by:
Dim dirs() as string = Directory.GetDirectories(MyPath) CheckedListBox.DataSource = dirs CheckedListBox.Update For I as Integer = 0 To CheckedListBox.Items.Count - 1 CheckedListBox.SelectedIndex = I DoMySub(CheckedListBox.SelectedItem) Next The first line in the For loop (CheckedListBox.SelectedIndex = I) sometimes
5
6860
by: mabond | last post by:
Hi Can't believe I've not been able to find the answer to this in the on-line help. I have a CheckedListBox which, via a timer control, is populated with the names of files in a network folder. The "check mark" for each item in the control is determined by the boolean value of a custom property field of the file. That value is found using microsoft's dsofile.dll class.
6
6932
by: Steve Teeples | last post by:
Can someone show me an example of how to place a "CheckedListBox" property within a PropertyGrid? -- ----------- Thanks, Steve
0
8676
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
8608
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
9161
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
9029
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
7732
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...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3050
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
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
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.