|
Hi all,
I have been working on a "web interface" project but I am unable to get it working. Here is what I want to implement. I have been trying to bind the 5 Listbox controls to a single Repeator Control. I have populated the 5 Listbox controls from the underlying database tables. Whenever the user selects values from each listbox controls the result should be displayed in the Repeater control. I can bind one listbox to the Repeater but I can't bind all five listboxes at the same time.
Looking forward to your reply
Thanks for your help,
Koonda
|
|
|
|
|
You can bind your repeater to an ObjectDataSource control, which is configured to use a method that takes 5 parameters. Then use ControlParameter controls within the ObjectDataSource, each configured to pull a value from one of the listboxes. Use AutoPostBack=true on each listbox so that a change in any will trigger a postback, refresh the ObjectDataSource, and redisplay data in your repeater.
That's one way to do it.
|
|
|
|
|
Thanks Mike Elison,
But I need some code examples. I am not using any code to get this project done. I am just draging the Listbox controls and a Single Repeater. I just change some html in the aspx file for the Repeater Control to get the values. Could you please send me some code to bind all the 5 Listbox Controls to the single Repeater Control to display information to the user
I realy appreciate your help.
Thanks
Koonda
|
|
|
|
|
koonda007 wrote: But I need some code examples. I am not using any code to get this project done. I am just draging the Listbox controls and a Single Repeater. I just change some html in the aspx file for the Repeater Control to get the values. Could you please send me some code to bind all the 5 Listbox Controls to the single Repeater Control to display information to the user
Nope. Databinding to a control like the Repeater is such a ubiquitous task - you need to understand it if you're going to get anywhere as an ASP.NET developer working with data. You need to look into the ASP.NET tutorials at:
http://www.asp.net/learn/default.aspx?tabid=63[^]
- the data tutorial particularly. And you'll want to look into MSDN documentation[^] on the topic.
I tell you what... look over all the material on those links. If you still have questions on displaying data in your Repeater (using values from 5 controls as parameters) post your question again.
|
|
|
|
|
Thank you very much for the links. In your 18th January reply I was confused with some terms, such as you said use the ControlParameter controls. What do you mean by that. Do you mean the ListBox control parameters or the Repeater control Parameters. Please also tell me is there any way to do that without coding?
Thanks
Koonda
|
|
|
|
|
Koonda -
I can't tell if I am misunderstanding your purpose or not at this point. Let me start over and ask some yes/no questions:
1. Do you have data that you want to be displayed through a Repeater control?
2. If so, are you using the five list boxes as parameters for that data? In other words, the selected values from each of the five will filter the data to be displayed in the Repeater?
If the answer to either of these questions is "no", then I've completely misunderstood your intention.
|
|
|
|
|
Hi all
I have an update form to update users data(name, fullname, password), when you select a user to update from the dropdown list, you can view his data, but the password is not viewed in its password control...
The problem is in the control itself, and not is getting data from the database,
I use these statements:
Text1.Value = dr.GetString(1) 'It works
Password1.Value = dr.GetString(2) ' it does not work
Reagrds...
Nour Abdel-Salam
|
|
|
|
|
It's 0 based, you know that, right ? Apart from that, if you're not getting it from the DB, you need to look at your SQL code, obviously
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Dear...
I didn't stand what do you mean by 0 based, and here is my sql:
cm.CommandText = "select * From users where u_id = " & DropDownList1.SelectedValue & " "
dr = cm.ExecuteReader()
If dr.Read = True Then
Text1.Value = dr.GetString(1)
Password1.Value = dr.GetString(2)
end if
waiting from you soon
and regards
|
|
|
|
|
nour123 wrote: I didn't stand what do you mean by 0 based
IT's VB, so I may be wrong. In C#, the first item in the list is number 0, not number 1.
The debugger will tell you what's coming back. Select * has the distinct disadvantage of not telling you how many items will be selected per row.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi,
I have deployed a .msi on the server and it has been installed very well. But now the problem is that when I try to run it I get this error:
The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Why could this be happening?
Thanks
|
|
|
|
|
Sir,
I have created a windows forms control in which I put a DSO Framer control. I have compiled it and registered in GAC. Even its doing fine when I used it in another windows application. But When I try to put it in a web page its not showing anything as it is the same thing showing the required word doc in windows application.
Please tell me what are the steps do I need to take to make it fine. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
This has turned into a nightmare for you, hasn't it ?
Can you add some code to catch errors and so on, at the top level of your control, and see what that turns up ? I think it's a permissions problem, I always said this would bite you.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
nightmare?
Its human nature and being a s/w emp is not an exception. While some one is sad, other feel funny or even happy too. What can I do, many great people have come to change it, still only a part is changed. Am I right Christian?
Could you please tell me Whats the exact meaning of Christian(dont feel otherwise I want to know it), I respect it actually. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
May be, but I have even changed security settings too. Still its not working. I dont take any thing as nightmare. One day we die, we all know about that. But every one is facing it. This problem w'nt be greater the that, so we can face it easily. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
So, it means that I dont have any other option to get it done. Even I am also fedup Christian. I am also tired by trying it out, but my client is considering as it is my fault only. He is not believing it. He is assuming that I dont know that.
This is very bad, I am feeling Christian. I feel very bad that I couldnt do it. I am about leave this for myself. Thank you for understanding and replying for my queries politely. Thank you very much. Ok. Take care.
Bye.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
indian143 wrote: So, it means that I dont have any other option to get it done
Well, put it this way. The bulk of the answers you've got, have been from me, and I've been telling you from before you started that this was not the way to go. So, yes, you need to explore another option, even if it's another way to get info on how to make this work. At a minimum, it seems that no-one here has any better advice to offer. And like I said, without looking at your code, I don't see how your question can be answered.
indian143 wrote: but my client is considering as it is my fault only.
Well, in some ways, it is. When a client asks for something that you don't know can be done, you should make it clear that you're initially offering to do paid research, not that you will find a way to do something that may not be technically possible. In the case of web dev, I would ask if they know of a site that does what they want, so you can establish if it's possible, and get something to look at to give you clues.
indian143 wrote: I feel very bad that I couldnt do it.
Yeah, I know it's tough. The most you can hope is that you've learned some things from the experience. Some things just can't be done, and most clients assume that we can do anything. That part is definately NOT your fault
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi All,
I m working on a shoping cart named etradehouse.com. We use different Payment Methods for that shoping cart. We have integrated our shoping cart with World Pay. Now we want to integrated it with pay pal. Can any one tell me how ? Any useful link with examples for that.
|
|
|
|
|
|
|
|
Hi folks, hope all's well. Sorry if this question has already been asked, if it has can someone post the link, I can't find it anywhere?
I need a little guidance please to choose the 'right' approach, as I am a newbie to ASP, ASP.NET and DHTML, however I have many years experience with MFC & VC++.
I am trying to add a web user control on several ASP.NET 2.0 web forms in VB.NET.
It's going to be a multi-column list control with fixed column headers, sortable columns when user clicks the header, alpha search when the user types on the keyboard, etc, basically all the usual stuff you'd expect from an VC++ MFC win app.
1. Used the wizard to create a 'Web User Control' in VB, and got 2 files: WebUserControl.ascx & WebUserControl.ascx.vb
2. I dragged a label into the control, and set some cell text: 'What the foo-k?'
3. Used wizard to create a 'Web Form': Default.aspx & Default.aspx.vb
4. Added a few labels & edit boxes from the toolbox's Standard section.
5. Half way down the form I dragged listPLU.ascx from 'Solution Explorer' and hey presto, saw my label, yee hah!
6. So now I need to know what the best approach is to replace the 'foo' label with a customizable list view control that responds to client events? Should it be a with formatting and heavy scripting? It only needs to work in IE
Thanks in advance for any help and guidance any of you kind people can offer me.
Will.
|
|
|
|
|
You want a datagrid or a gridview.
These controls are basically engines for generating <table>s, and binding them to data.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
So the solution is a customised table in a user control for reusability.
I tried "Response.Write" to output a simple table's HTML in the user control's "Page_Init" function.
But in the source, the control's HTML appears above the holding page's HTML, and doesn't show in the browser. ie. It's not placed into the position of the control on the sheet.
How do I get the table to appear in the correct place in the holding page? ie. Where should I place the code to dynamically construct the table?
Remember that this control needs to respond to user evens such as clicking on the THEAD section to sort by columns, or key down to search the list for the required text (using a timer).
Thanks in advance for all your help,
Will.
|
|
|
|
|
Guys,
This article looks like it really helps:
http://www.codeproject.com/useritems/AutocompleteTextbox.asp
It explains:
1. Where to put your control's HTML so that it appears in the corrrect place in the parent page, when it's rendered.
2. How to inject the js file includes into the head that will process/link all the control events.
Ta!
Will.
|
|
|
|