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

Dynamic dropdownlist error

i have created a number of combo boxes according to my need.no i want to save the changes when any one click update button,but here the control did not find by findcontrol function.
Dim i, j, totc As Long, FcNo As String, cmbcat As Object, fid As ArrayList
catarry = New ArrayList
catarry = CType(ViewState("catgs"), ArrayList)
totc = CLng(ViewState("totcts"))

For i = 0 To totc - 1
'for category combo box
'cmbcat = New Object
'cmbcat = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList)
'cmbcat = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList)
'cmbcat = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList)
If Not CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList) Is Nothing Then
FcNo = CType(Me.FindControl("catpp" & catarry(i * 3 + 1)), DropDownList).Text
End If
StrQry = "update category set cat_order=" & FcNo & " where cat_no=" & "catpp" & catarry(i * 3 + 1)
'Now check for all forums of category
fid = New ArrayList
fid = AllFunctions.PopToarraylist("select Forum_No from Forum where cat_no=" & catarry(i * 3 + 1), 1)
For j = 0 To fid.Count - 1
cmbcat = New Object
'cmbcat = CType(FindControl("frmpp" & fid(i)), DropDownList)
'cmbcat = CType(FindControl("frmpp" & fid(i)), DropDownList)
'cmbcat = CType(FindControl("frmpp" & fid(i)), DropDownList)
If Not CType(Me.FindControl("frmpp" & fid(i)), DropDownList) Is Nothing Then
FcNo = CType(FindControl("frmpp" & fid(i)), DropDownList).Text
End If
'cmbcat.Text
StrQry = "update Forum set Forum_Order=" & FcNo & " where forum_no=" & fid(i)
AllFunctions.UpdateQry(StrQry)
Next
Next
May 4 '07 #1
0 822

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: TheHach | last post by:
Hi. (For information, i'm working in VB.NET) I have a datagrid on my page. On its creation, I add a dropdownlist in each cell, with a different ID each time. This works fine. But now, I...
0
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string...
0
by: imranabdulaziz | last post by:
hi all , i am mess with the one situation. i am using asp.net2.0 ,C# and sql server 2005. I have checkboxlist and based on user selection i creates dynamic controls(which code is in...
1
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button...
0
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...

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.