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

please help...

Hi,

I am using a dropdownlist in my asp.net proj. By default i have many listitem values listed.
code is similar to:
admin.aspx
<asp:dropdownlist id="lstStudyType" runat=server autopostback=True >
<asp:listitem value="All">All </asp:listitem>
<asp:listitem value="Marketplace research tool (Q1 2005)">Marketplace research tool (Q1 2005)</asp:listitem>
<asp:listitem value="Bay Area, California, USA (Q2 2005)">Bay Area, California, USA (Q2 2005)</asp:listitem>
<asp:listitem value="Baldwin Park Visit">Baldwin Park Visit</asp:listitem>
</asp:dropdownlist>


I am redirecting to this page from another page(EditRequestStudy) with a query string value: admin.aspx?RequestStudy=<StudyType>.. this study type is decided at run time.. Normally when the admin.aspx page is loaded the dropdownlist is databinded from a database which has 5 types of RequestStudy. The sql query used to populate the ddl is <Select RequestStudy, DisplayOrder From VisitInfo Order By DisplayOrder>, so the deafult values in the list item is not shown in the ddl.

so always a particular RequestStudy(say test visit) comes first in the ddl.

So whenever i redirect to admin.aspx from EditRequestStudy always the test visit comes first in the ddl and not that corresponding requeststudy which i had edited.

So to do that i tried to use the following code in my admin.aspx..
ddlID.Items.Insert(0, "Park Visit"); [ say Park Visit is the one that i edited]
ddlID.AppendDataBoundItems = true;


also i used to following SQl query..
<Select RequestStudy,DisplayOrder From VisitInfo WHERE RequestStudy!='"+Park Visit+"'"+" ORDER by DisplayOrder>

But when i run it, the Park visit is first shown in my ddl, but also the default values in the list item also comes up, which i do not want..

Is there any way in which i culd have my park visit come up first in the ddl, and only those in the database as the rest of the values in the ddl..

I realize some parts may not be clear.. but i hope i have tried to clear my prob..

Thanks,
Nitin..
Mar 16 '07 #1
0 847

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

Similar topics

0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
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: 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...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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...
0
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...

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.