Data presentation control in another Data presentation control
Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...
Getting Information from the Controls (TemplateField or BoundField ) from any of the Data Presentation Controls
Hello Everybody,I have a very important question for me.For example, I have a GridView.It has three BoundFields and one TemplateFieldI want to get information from any of the record (row,line etc ) using any of the BoundFields or TemplateFields.And also I want to accomplish this not only with GridView but also other Data Presentation Controls, DetailsView FormView and Repeater.Shortly, Can anybody help me how to refer Controls in GridView, FormView, DetailsView, RepeaterPS: I have searched in Google and many sites,forums. But I couldn't see any solution and see that many people ask the same ...
1 Data Control, 2 datasources?
ok - I am fairly new to the .Net way of doing things - so maybe the answer to my question is staring me in the face, but I need some help to see it! Thanks in advance for any who read this! :)
I have a form with a DataList on it. in the Item template, I have many data controls. (CheckBoxList, DropDownList, etc.)
I have set the Datasource of the DataList to an ObjectDataSource (odsDetails) - and for fields that I can bind directly to controls (textboxes, etc) - this works great!
However, I have other queries that populate the items in the dropdownlist and the...
FileUpload control value gets clear when another control uses Ajax to retrieve data
Hello all, I have a web form. There is a DropDownList control inside an update panel and the content is updated when a RadioButtonList control fires SelecteIndexChanged. I also have another control, a FileUpload control. If you select a file for the file upload control and then change the value RadionButtonList list control, the selected file in the FileUpload control disappears.How do I prevent RadioButtonList from clearing the value of the FileUpload control?Any help will greatly appreciated, TIA,Dawa Below is the code: 1 <asp:RadioButtonList ID=&quo...
Bind Data to an Image Control not in a Data Presentation Control
I've been searching for two days but I don't really know what to search for.I'm making a site for a photographer. The Default.aspx page displays Albums by showing a title, image and description from the database table Albums. Click an album to view the contents and it passes the QueryString which is AlbumName. The ViewAlbum.aspx page uses the QueryString to display an UpdatePanel holding a Large Image and a Repeater full of dynamically filled ImageButtons for thumbs. Both are from the database table Photos and are retrieved using an ObjectDataSource. Click the ...
using javascript getting value from textbox when edit button is clicked and both controls are present in gridview control
Hi All using javascript I want to get value from textbox when edit button is clicked and both controls that is texbox and button are present in gridview control .Alok
Hi aloksinha83,
Please see this post: http://forums.asp.net/t/1069245.aspx
Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....
how can i get the values in checklist control?
i have a checkboxlist control with values inside like five values. i want to check multiple values and band it to a label. pls how is it possible?
string str = "";foreach(ListItem li in CheckBox1.Items){ if (li.Selected) str += li.Value + "<br />";}Label1.Text = str;You can use www.codechanger.com to convert to VB is required. Regards Mike [MVP - ASP/ASP.NET]My site...
How can I get the value from a Data Grid?
How can I get the text out of a datagrid? I have a help desk application that once the ticket is closed, it will fire off an email to the person that submitted it. That persons email is displayed in a datagrid. I need that info to use it in the email address. Any hints????
dim userEmail as string
userEmail = CType(e.Item.FindControl("Email"), TextBox).Text...
login control can i used to controll what data can user see it
i have a project with mulit company can i used login control to control what company user can see it and what user cant see it
the company comes from databasethanks alot for any helphttp://www.feckra.com/blog/
first of all you should have a table in database database that contains (user_id, company_id, password, auth_level). the auth_level can be used to grant specific content/page access to each user of each company. but, you need to override the authentication process as bellow.
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { L...
I can SEE the data, but I can't GET the data...which is the most important to me :/
I've got a linkbutton I click, which (in an update panel) posts back, queries a database for values, then searches the controls in another updatepanel and updates their Text fields with that data....that part works great.
I then have a master button (not in an update panel) which is supposed to query those same controls, and concatinate the Text values. This is the part which doesnt work when I click the LinkButton...however if I just manually enter the values then click the master, I get all my text.
Any idea what might be going on? :(
Look for JavaScript errors in your browse...
2nd Data Grid Control
Hi, i have a DataGrid control on page that has a hyperlinked field. When you click on the hyperlink the page opens, and returns the selected information from the database as it is supposed to. However, I wanted to put another dataGrid on the hyperlinked page that pulls up more information about the hyperlinked item. I tried this SQL statement but it returns all the rows of the database, when in actuality all i want it the second dataGrid to show certain columns from a different DB table.
SELECT tbllog.IttNumber, tbllog.IttLog, tbllog.Lo...
Can a DataSource set the default value in a DropDownList (or the list fetch the value from a DataSource)?
Hi
I have a DropDownList that gets its values from a DataSource-control. Nothing magic so far. What makes me scratch my head is that I need to set the default (selected) value in the drop down.
As the values come from a data source, I do not know the key/value/index of the default I. Is there a possibility to make the drop down "ask the data source" which key should be the default (that is, only if the drop down is populated the first time, of course)?
Background: I have an application where an administrator can set the "standard" month that the application s...
How can I get the value of a control inside PlaceHolder
How can I get the value of a control inside PlaceHolder with c#
Depends where the PlaceHolder is living (if it's inside a template of a DataList or Repeater) and whether it was filled with a control at compile-time (likely the case) or at runtime.
The basic approach is this:
Lable lbl = (Label) thePlaceHolder.FindControl("theIdOfTheControl");
string whatINeed = lbl.Text;
Of course you can do the same with a TextBox control or so (replace the castings, replace the name of the control in the FindControl call and use the property you need to retrieve the information you ...
How can I get other column value of DataSource in ItemDataBound event?
Hi all
In ItemDataBound event, How can I get other column value of DataSource?
for example ,I have 3 column,customer_id,customer_name,customer_tel
customer_id,customer_name has display on DataGrid.
Now I want to get customer_tel in ItemDatabound event.
How do I?
Thanks a lot.
Clare
There is a DataItem property of the e.Item that ruturns items datasource. All you need to do is to cast it to an appropriate type. If you binding your grid to DataTable or DataView, it is DataRowView
Dim dtr as DataRowView = ctype(e.Item.DataItem,DataRowView)
Bug [MCSD]...