Click here to Skip to main content
15,921,884 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionGridView? Pin
Murthy Puvvada6-Feb-07 11:13
Murthy Puvvada6-Feb-07 11:13 
AnswerRe: GridView? Pin
varshavmane6-Feb-07 17:47
varshavmane6-Feb-07 17:47 
GeneralRe: GridView? Pin
Murthy Puvvada7-Feb-07 2:02
Murthy Puvvada7-Feb-07 2:02 
AnswerRe: GridView? Pin
gauthee6-Feb-07 18:59
gauthee6-Feb-07 18:59 
GeneralRe: GridView? Pin
Murthy Puvvada7-Feb-07 1:54
Murthy Puvvada7-Feb-07 1:54 
QuestionChecking if the item exists in a combox?? Pin
Nada Adel6-Feb-07 8:48
Nada Adel6-Feb-07 8:48 
AnswerRe: Checking if the item exists in a combox?? Pin
Christian Graus6-Feb-07 13:34
protectorChristian Graus6-Feb-07 13:34 
AnswerRe: Checking if the item exists in a combox?? Pin
Vsree6-Feb-07 18:37
Vsree6-Feb-07 18:37 
Hi
While populating the combobox,you can add both text and value like,
Fill the fieldname to be populated along with any unique field to distinguish the items(say same name for 2 persons but different EmpID exist in db) in a datatable(dt).
Then,
<br />
ComboBox1.DataSource = dt.DefaultView;<br />
ComboBox1.DataTextField = "fieldname";<br />
ComboBox1.DataValueField = "same or any unique field name to distinguish text field";//use of "" is must<br />
ComboBox1.DataBind();<br />


Then you can check the item's existence as,(in the method where you again populate)

<br />
ListItem item = ComboBox1.Items.FindByValue(dt2.Rows[0]["UniqueFieldName"].ToString());<br />
if(item==null)<br />
   ComboBox1.Items.Add(new ListItem(dt2.Rows[0]["FieldName"].ToString(),dt2.Rows[0]["UniqueFieldName"].ToString()));<br />
else<br />
    //display message or any relevant code<br />


Hope this piece will help you.
Let me know if you have any issues over this

~VSreeSmile | :)
QuestionAll Web controls must be placed within a &lt;form runat="server"> tag to function properly. Pin
elane6-Feb-07 8:12
elane6-Feb-07 8:12 
AnswerRe: All Web controls must be placed within a &lt;form runat="server"> tag to function properly. Pin
Pradipta Basu6-Feb-07 8:21
Pradipta Basu6-Feb-07 8:21 
AnswerRe: All Web controls must be placed within a &amp;lt;form runat=&quot;server&quot;&gt; tag to function properly. Pin
Guffa6-Feb-07 10:00
Guffa6-Feb-07 10:00 
QuestionHow to Use ajax control toolkit with asp.net1.1 Pin
suriee6-Feb-07 7:11
suriee6-Feb-07 7:11 
AnswerRe: How to Use ajax control toolkit with asp.net1.1 Pin
Christian Graus6-Feb-07 13:36
protectorChristian Graus6-Feb-07 13:36 
GeneralRe: How to Use ajax control toolkit with asp.net1.1 Pin
suriee7-Feb-07 0:09
suriee7-Feb-07 0:09 
GeneralRe: How to Use ajax control toolkit with asp.net1.1 Pin
Christian Graus7-Feb-07 9:24
protectorChristian Graus7-Feb-07 9:24 
QuestionHTML, VBScript, and Registry Reading Pin
drew.perkins6-Feb-07 6:23
drew.perkins6-Feb-07 6:23 
QuestionResponse.Cache.AddValidationCallback - incorrect behaviour??? Pin
egor5986-Feb-07 5:59
egor5986-Feb-07 5:59 
QuestionA data source instance has not been supplied for the data source 'DataSetAUDITLOG_CountLessons' Pin
Sarfaraj Ahmed6-Feb-07 5:37
Sarfaraj Ahmed6-Feb-07 5:37 
QuestionHow to use drop down list in details view? Pin
Alex Ru6-Feb-07 5:23
Alex Ru6-Feb-07 5:23 
AnswerRe: How to use drop down list in details view? Pin
Murthy Puvvada6-Feb-07 15:05
Murthy Puvvada6-Feb-07 15:05 
GeneralRe: How to use drop down list in details view? Pin
Alex Ru27-Apr-07 5:53
Alex Ru27-Apr-07 5:53 
GeneralRe: How to use drop down list in details view? Pin
Murthy Puvvada27-Apr-07 12:42
Murthy Puvvada27-Apr-07 12:42 
GeneralRe: How to use drop down list in details view? [modified] Pin
Alex Ru11-May-07 3:25
Alex Ru11-May-07 3:25 
QuestionSubmit Button problem when the iser presses enter Pin
nour1236-Feb-07 4:23
nour1236-Feb-07 4:23 
AnswerRe: Submit Button problem when the iser presses enter Pin
Blue_Boy6-Feb-07 4:37
Blue_Boy6-Feb-07 4:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.