473,382 Members | 1,784 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,382 software developers and data experts.

Programatically controlling the inner controls of a Formview Control

I'm trying to get up to speed on ASP.Net & C# development having come from a
VB6 background.

I know that I can refer to an inner control of a formview control by using a
lines such as

DropDownList ddlDeactivationId;
int deacId;
ddlDeactivationId =
(DropDownList)FormView1.Row.FindControl("DropdownL ist2");
deacId = ddlDeactivationId.SelectedIndex;
What I'd like to know (and haven't figured out yet) is how I can
programatically set the value of one of these inner controls?


Nov 20 '05 #1
1 1279
DropDownList ddlDeactivationId;
ddlDeactivationId = (DropDownList)FormView1.Row.FindControl("DropdownL ist2");
ddlDeactivationId.SelectedIndex = 2 //you can set the values like this...

Thanks,
Sridhar.

"Neil" wrote:
I'm trying to get up to speed on ASP.Net & C# development having come from a
VB6 background.

I know that I can refer to an inner control of a formview control by using a
lines such as

DropDownList ddlDeactivationId;
int deacId;
ddlDeactivationId =
(DropDownList)FormView1.Row.FindControl("DropdownL ist2");
deacId = ddlDeactivationId.SelectedIndex;
What I'd like to know (and haven't figured out yet) is how I can
programatically set the value of one of these inner controls?


Nov 20 '05 #2

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

Similar topics

3
by: Scott at Cedar Creek | last post by:
Can I put a repeater inside a FormView? Can I put a repeater inside that repeater? If so, what happens when the FormView.Mode is "Edit?" When they click the EDIT button is my repeater data also...
0
by: Hawk | last post by:
Hello, this is my first post hope to get some good answers. I am using asp.net 2.0 and I am trying to pass the value entered in the formview textbox in insert mode "in this case it is the...
1
by: Martin | last post by:
Hi, I have a FormView control with a MultiView control within it's EditItemTemplate (because using a Wizard doesn't maintain two way data binding - MS confirmed bug). Any how, I have the...
3
by: Howard | last post by:
how do I access a textbox control inside a formview? formview.textbox1.text == "hello world"; doesn't work
2
by: wikkiwikkiwaa | last post by:
hello, i am trying to access controls inside my formview1 nested inside loginview1. you cannot access the formview1 unless you are properly logged in. for loginview1, that seems to be fairly...
6
by: J055 | last post by:
Hi I have a FormView, Panel and ObjectDataSource control. I'm trying to change the Panel.Visible property to true based on a value in the ReturnValue object in the ObjectDataSource.Selected...
2
by: Nathan Sokalski | last post by:
I am trying to create a FormView controls in which I access and modify the the controls in the PagerTemplate programmatically. However, I continue to recieve the following error: Object...
3
by: darkmage1975 | last post by:
Hi to all! I'm using a FormView control heavily customized and I need to enable some inner textboxes when the user write something in another inner textbox. So I need to use inner controls events...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.