Monday, February 22, 2010

Several Ways Redirect to Another Page

Hyperlinks

Performs new request on the target page.
Does not pass current page information to the target page.
Requires user initiation.
Redirects to any page, not just pages in the same Web application.
Enables you to share information between pages using query string or session
state.

Cross-page posting
Posts current page information to the target page.
Makes post information available in the target page.
Requires user initiation.
Redirects to any page, not just pages in the same Web application.
Enables the target page to read public properties of the source page if the pages are in the same Web application.
To pass current page information to the target page (as in multi-page forms).
When navigation should be under user control.

Browser redirect
Performs a new HTTP GET request on the target page.
Passes the query string (if any) to the target page. In Internet Explorer, the size of the query string is limited to 2,048 characters.
Provides programmatic and dynamic control over the target URL and query string.
Enables you to redirect to any page, not just pages in the same Web application.
Enables you to share information between source and target pages using session state.
For conditional navigation, when you want to control the target URL and control when navigation takes place. For example, use this option if the application must determine which page to navigate to based on data provided by the user.

Server transfer
Transfers control to a new page that renders in place of the source page.
Redirects only to target pages that are in the same Web application as the source page.
Enables you to read values and public properties from source page.
Does not update browser information with information about the target page. Pressing the refresh or back buttons in the browser can result in unexpected behavior.
For conditional navigation, when you want to control when navigation takes place and you want access to the context of the source page.
Best used in situations where the URL is hidden from the user.

Wednesday, February 10, 2010

Detect Javascript is enabled in ASPX programmatically

if (Session["Flag"] == null)
{
Session["Flag"] = "Checked";
string path = Request.Url + "?temp=1";
Page.ClientScript.RegisterStartupScript(this.GetType(), "redirect",
"window.location.href='" + path + "';", true);
}
if (Request.QueryString["temp"] == null)
Response.Write("JavaScript is not enabled.");
else
Response.Write("JavaScript is enabled.");

Monday, February 1, 2010

Could not find the visual SourceSafe internet web service connection information. SourceSafe web service cannot be accessed.

Could not find the visual SourceSafe internet web service connection information. SourceSafe web service cannot be accessed.


Solution:

Visual Studio -> Tools -> options -> Choose Source Control and Plug-in Selection.

Switch Back to Microsoft Visual SourceSafe instead of Microsoft Visual SourceSafe(Interenet);