473,796 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic dropdownlist error

1 New Member
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.FindCo ntrol("catpp" & catarry(i * 3 + 1)), DropDownList)
'cmbcat = CType(Me.FindCo ntrol("catpp" & catarry(i * 3 + 1)), DropDownList)
'cmbcat = CType(Me.FindCo ntrol("catpp" & catarry(i * 3 + 1)), DropDownList)
If Not CType(Me.FindCo ntrol("catpp" & catarry(i * 3 + 1)), DropDownList) Is Nothing Then
FcNo = CType(Me.FindCo ntrol("catpp" & catarry(i * 3 + 1)), DropDownList).T ext
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.Po pToarraylist("s elect Forum_No from Forum where cat_no=" & catarry(i * 3 + 1), 1)
For j = 0 To fid.Count - 1
cmbcat = New Object
'cmbcat = CType(FindContr ol("frmpp" & fid(i)), DropDownList)
'cmbcat = CType(FindContr ol("frmpp" & fid(i)), DropDownList)
'cmbcat = CType(FindContr ol("frmpp" & fid(i)), DropDownList)
If Not CType(Me.FindCo ntrol("frmpp" & fid(i)), DropDownList) Is Nothing Then
FcNo = CType(FindContr ol("frmpp" & fid(i)), DropDownList).T ext
End If
'cmbcat.Text
StrQry = "update Forum set Forum_Order=" & FcNo & " where forum_no=" & fid(i)
AllFunctions.Up dateQry(StrQry)
Next
Next
May 4 '07 #1
0 836

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

Similar topics

4
1979
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 can't access on the selected values of those dynamic dropdownlists.
0
2914
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 strDataValueField; string strDataTextField; public CreateEditItemTemplateDDL(string DDLName,string DataValueField,string
0
1155
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 filterbutton_Click event and i call createcontrols function(public) in that ).But when i select value of that control(dynamic created) in another button click event(searchbutton) first it create fuction does not create dynamic control second as a result i...
1
4662
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 ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by pressing Remove button the selecetd row will be removed. I used viewstate to keep my value for postback, I want by changing selectedvalue of...
0
3502
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- 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 ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by...
0
9527
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
10453
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
10223
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...
1
10172
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9050
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...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
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
4115
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
3
2924
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.