ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
One Listbox showing all cities. If you select one city in
list box the information related to that particular city
should be displayed in Datagrid . How do you do that?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: One Listbox showing all cities. If you select one city in list box the information related to that particular city should be displayed in Datagrid . How do you do that?
Answer
# 1
protected void ddlcity_SelectedIndexChanged(object sender, 
EventArgs e)
    {
        if (ddlcity.SelectedValue == "Any of the city name")
        {
            DataSet ds = GetUserInfo();
            GridviewCitycity.DataSource = ds;
            GridviewCity.DataBind();
        }
    }
 
Is This Answer Correct ?    2 Yes 1 No
Yogaraj I
 
  Re: One Listbox showing all cities. If you select one city in list box the information related to that particular city should be displayed in Datagrid . How do you do that?
Answer
# 2
protected void ddlcity_SelectedIndexChanged(object sender, 
EventArgs e)
    {
sqlConnection con= new sqlConnection(" ");
string str="select * from table where city ='" + 
ddlcity.SelectItem.Text ="'";
       sqlDataAdapter da= new slqDataAdapter(str,con)
dataset ds = new dataset;
da.fill(ds,"City");
dgview.datasource=ds.tables["City"];
dgview.dataBind();
}
 
Is This Answer Correct ?    3 Yes 0 No
Sathish
 
 
 
  Re: One Listbox showing all cities. If you select one city in list box the information related to that particular city should be displayed in Datagrid . How do you do that?
Answer
# 3
On select change event of the list box use the following code.

Dim con as new sqlconn("connectionstring")
con.open()
dim da as sqlda("select * from table where cityname=" &
listbox1.selecteditem)
dim ds as new dataset
da.fill(ds)
 
Is This Answer Correct ?    3 Yes 0 No
Sathish
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
What is the difference between ExecuteReader,ExecuteNonQuery and ExecuteScalar.  3
Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?  1
How many webforms are possible on a single webpage?  5
what is the difference between console.writeline &console.output.writeline?  2
What is cookie less session? How it works?  1
about view state and how validation controls will be executed on client and server Wipro2
What is the difference between <%#%> and <%=%>? IBS4
What is the function of the CustomValidator? a) It allows for custom C# client-side code to validate entries in a control. b) It allows for a custom mixture of validator controls to use one central control for the display of messages. c) It uses scripted client-side code to validate the entry in a control. d) It uses server-side code to validate the entry in a control. Syntax-Softtech2
How to write unmanaged code and how to identify whether the code is managed / unmanaged ? Accenture1
How do you perform validations? Microsoft2
How do you validate the controls in an ASP .NET page?  2
In which interface the template of any control like Gridview would Initiate?  2
How to retrieve data row by row from a DataTable? Thanks In advance PriyaPP  3
how to update data using store procedure  1
what is the trace in ASP.NET  4
hi ans dis qstn. "what is d max size of query string. If it exceeds does it give error. if yes wt error it gvs, if no gv the reason" thnx in advance  3
i want to develope a page for online test using asp.net with c#.net. so, how to insert the questions in the database sqlserver2000 and how to pick the questions randomly when user login for test. plz send the code for this.... TCS3
WHT IS DIFFERENCES BETWEEN HTML CONTROLS AND SERVER CONTROLS. HCL9
Below is a code extract from an ASP.Net application. The code basically reads data from the “name” field in the “members” table and prints them onto the webpage. Using the assumptions provided, fill in the 4 blanks below so that the code will run correctly. ‘Assumptions: ‘conn_str is a variable that holds the connection string to the database ‘Objects dbcomm and dbread are already declared earlier dbcomm = New OleDbCommand("SELECT name FROM members", conn_str) dbread = dbcomm._______________ _____________________ response.write(_______________) _____________________ dbread.Close() Techno-Solutions3
How can u handle Exceptions in Asp.Net?  4
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com