What is the difference between Server.Transfer and
Response.Redirect? Why would you choose one over the other?

Answer Posted / d

Put it inside <configuration> section

<connectionStrings>
<add key="conString" value="server=01HW154261\SQLEXPRESS;
database=MyDB; user id=; password=;" />
</connectionStrings>

SqlConnection con = new SqlConnection();

con.ConnectionString = ConfigurationManager.AppSettings
["conString"].ToString();

con.Open();

SqlDataAdapter adapter = new SqlDataAdapter("Select a.State
From State as a inner join Country as b on a.CountryID =
b.CountryID where b.CountryID = " + countryID, con);

DataSet dstCountry = new DataSet();

adapter.Fill(dstCountry);

con.Close();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a nested masterpage in asp.net 2.0? Can there be a master page inside a masterpage?

600


What is the difference between table and query?

627


How could you modify xaml content from javascript?

598


Explain About WebService

758


How to display validation messages in one control?

635






What do you understand from custom control?

685


What are html helpers in asp.net?

640


What is rich control in asp.net?

617


What happens if an ASP.NET server control with event-handling routines is missing from its definition?

703


What does session_start () do?

731


Explain the difference between sql invalidation and sql notification.

635


Define satellite assemblies.

668


In the Repeater control which way you can edit?

727


What is a postback ispostback and autopostback in asp net?

560


What is server redirect?

637