Redirect - C# Avoid Navigation On Enter Key?

Sep 9, 2010

How can i avoid navigation when a user presses the enter key on an asp.net page ?

Seems that they get redirected to the first page in the directory structure "AccountAccountRcovery"

I don't actually have any code to redirect to that page. Also can this be disabled for the entire site ? as i have quite a few pages that would require modifications otherwise.

Edit: This seems to only affect IE ,doesn't happens in Firefox.

This is the content for an empty page, where this thing still hapens.

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="Wip.test" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>

View 1 Replies


Similar Messages:

Web Forms :: Navigation And Response.redirect?

Mar 25, 2010

I have a site that uses authentication. I will be displaying links to other sites.Currently I am using Link Buttons because the link maybe to another site or a file in our DB so the Link Button allows me to place the DB id field into the command argument.So when the user clicks on one of the buttons I check to see if it match's a web site and if so I want to direct the user to the site. Here is the code.

[Code]....

strfile being the text of the button. This works, however it opens it in the same window which is less then desirable. I would like to open it in a new window. I have triedclient side scripting, I have tried process.start, and other ways to open the link in a new window. When I use these methods and I click on the button the page posts back but the link is never opened. I do have the Link Buttons inside a update panel and haveadded the button as a trigger with the same results. I have also moved the button out side of the update panel same results. Also the Link Buttons are inside a panel control.Another point this is being done in the code behind VB.net.

View 9 Replies

Redirect Enter Press In Detailsview?

Jan 25, 2011

When using a scanner to insert into a detailsview the scanner scans and then presses enter. How do I either redirect the enter to be a tab, or just stop the enter key from triggering the insert method?

View 1 Replies

Web Forms :: How To Avoid Postback When "Enter" Button Is Clicked In A Asp.net Page

Feb 22, 2011

I'm having many child pages under a master page. When ever i click "Enter" button from my keyboard from the child page

1. A postback happens and the page is redirected to some other page

View 2 Replies

Page Redirect To The Startup Page After Hit Enter At TextBox Control?

Jan 6, 2010

I have a simple page, which have a couple of textbox controls for order number and id, and a Button control which takes the input from the textbox controls to search in database.

I found that if I type something in the textbox control and hit enter key on the keyboard, rather than use mouse to press the button control, the page will be redirected to the startup page of the web application.

I am wondering is that because of the default setting of the page or anyway I can fix this?

View 2 Replies

Web Forms :: How To Work With Navigation Menu And Assign Pages In Navigation Menu In Master Page

Aug 25, 2010

Iam using masterpage and i want to use navigation menu ,but i don't want to use sitemap concept

how to work with navigation menu and assign the pages in navigation menu in master page

View 2 Replies

C# - Cant Enter Characters In Password Field. Can Enter Number Only?

Dec 22, 2010

I used the following code to encrypt the password using md5 and store it in the database.

public partial class register : System.Web.UI.Page
{
SqlConnection con = new SqlConnection("Data Source=Shihab-PC;Initial Catalog=test;User

[code]...

View 3 Replies

Web Forms :: Navigation Menu / Login And Add Some Buttons To Navigation Menu

May 19, 2010

I'm developing a Portal to a school

I need to login (ok)

I also need when the login is ok, to add some buttons to navigation menu, taht is created in the Master Page.

Is it possible?, how?

i already handle the page load on the default page.

View 3 Replies

Which One Is Better Response.redirect Or Postbackurl(asp:button Feature) To Redirect Webpage

Aug 13, 2010

which one is better response.redirect or postbackurl(asp:button feture) to redirect web page?

View 3 Replies

Response.Redirect - Local Characters - Redirect To Obtain A Clean Url ?

Jul 18, 2010

I want to redirect to "~/City/Göteborg", but if I just write Response.Redirect("~/City/Göteborg"); I will end up with an ugly URL in the address-bar like this: http://www.mysite.com/City/G%c3%b6teborg..

So my question is how to redirect to obtain a clean url like http://www.mysite.com/City/Göteborg?

View 3 Replies

Web Forms :: Response.Redirect - Redirect To Error Page ... ?

Mar 6, 2011

I have a problem with Response.Redirect to specific error page.

so far i have something like :

protected void Page_Load(object sender, EventArgs e)
{

if ((Request.QueryString["UbytovaniePrispevokID"].ToString()) == "")[code]......

What i want to do is.. I have one main page with new posts Each subject of the new post is the link to Another page where is Specific post and coments and user can leave a coment.

What I want is when the Request.QueryString["UbytovaniePrispevokID"].ToString()) == "" or null I want to redirect to error page ...

View 3 Replies

Security :: Cannot Redirect To Login.aspx - How To Redirect To It

Apr 16, 2010

my application is running under asp.net 2.0 and in iis 5.0 (Windows XP) in my machine.config, i have the following setting

[code]...

whenever i go to my default.aspx page, it seems it doesn't redirect to login.aspx.

View 5 Replies

Redirect To Other Page From Pop Up Window With Response.redirect?

Feb 13, 2010

how can i redirect to other page from pop up window with response.redirect.

View 2 Replies

MVC :: Navigation / How To Solve This?

Nov 8, 2010

I used below code in ASp.NET web forms code behined. Its passing parameter in the URL to which which page I am on so that I make HTML and add ON CLASS to show the page I am on.

How I solve this in MVC?. Any clean approach.

[Code]....

View 1 Replies

C# - Navigation Bar From Database

Apr 1, 2010

i want to make navigation bar with items i will select them as (category,Product,....) So i made stored to get them throught paramater will pass it,s value from query string as.

ALTER Proc Navcategory
(
@Category_Id Int
)
As
Select Distinct Categories.Category,Categories.Category_Id
From Categories
Where Category_Id=@Category_Id
and i mentioned in cs
as
if (Request.QueryString["Category_Id"] != null)
{
Banar.ImageUrl = "Handlers/Banner.ashx?Category_Id=" + Request.QueryString["Category_Id"] + "";
using
(SqlConnection conn = Connection.GetConnection())
{
SqlCommand cmd = new SqlCommand();........................

View 1 Replies

How To Show The Navigation Status

Jan 14, 2010

I will have a web site which include serveral functions for a training coudrse. For example,

1. Search the course
2 . Register the course.

What I want is to show the current status in the left pane of the browser. for example, if the user is searching the course, then in left pane "serach course" Will be highlighted. If the user is registering the course, then in left pane "registering course" will be highlighted.

View 3 Replies

Navigation Link In A Website?

Sep 13, 2010

I have a login module in my webpage from where i want to redirect every user to a common page but their accessibility should vary on the same page,..some of them should get 10 links on that page whilw some should get 20 links on the same page...

View 1 Replies

Web Forms :: Navigation Bet Pages?

Jul 1, 2010

In the application i come to products.aspx from five different pages.I have back button on the products.aspx page.How find from which page user navigated to products.aspx

View 2 Replies

MVC :: 1.0 - Breadcrumb Navigation For Application In C#

Jan 4, 2011

i've been looking everywhere to find a good tutorial on building a simple breadcrumb navigation for my application. I know that MVC 2.0 can do this very easily but for my application it needs to be in 1.0 as that is what is used at the University. Could anybody point me in the right direction as I seem to be spending way too much time for something that is supposed to be a simple add on.

View 1 Replies

Breadcrumb Navigation On Page

Mar 22, 2010

I have a question for the navigation and I don't know how. For example when the users access the product page, on the top of the page it will display home > product, if the user access one product in the pens category, it will display home>product>pens.

View 6 Replies

Navigation Menu Like Thegatesnotes.com?

Jan 27, 2010

Anyone know how to create a menu like the thegatesnotes.com ? Can we custamize the treeview control like that?

View 1 Replies

Navigation Menu Not Aligned

Jan 11, 2011

I am putting a navigation menu with in a div but the menu in aligned correctly. I want it to aling to top but it is being placed at the bottom.

Here is the script:

<%@ Master Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>Super Dream Mattress Co. </title>
<meta name="description" content="Super Dream Mattress Co. - Scorland only Memory Foam Mattress Manufacturer. We Manufacture Foam Toppers, Double Mattresses, Single Mattresses and Kingsize Mattresses. Free next day delivery on items, contact us online or call
0141 810 4333" />
<meta name="keywords" content="memory foam mattresses, memory foam toppers, memory foam double mattress, memory mattress, memory foam mattresses, Super Dream Mattress Co, Superdreammattressco" />
<script type="text/javascript" src="script.js"></script>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" href="style.ie6.css" type="text/css" media="screen" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" href="style.ie7.css" type="text/css" media="screen" /><![endif]-->
<style type="text/css">
.newStyle1
{
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
}
</style>
</head>
<body>
<div id="art-page-background-simple-gradient">
</div>
<form id="form1" runat="server">
<div id="art-main">
<div class="art-Sheet">
<div class="art-Sheet-tl">
</div>
<div class="art-Sheet-tr">
</div>
<div class="art-Sheet-bl">
</div>
<div class="art-Sheet-br">
</div>
<div class="art-Sheet-tc">
</div>
<div class="art-Sheet-bc">
</div>
<div class="art-Sheet-cl">
</div>
<div class="art-Sheet-cr">
</div>
<div class="art-Sheet-cc">
</div>
<div class="art-Sheet-body">
<div class="art-Header">
<div class="art-Header-png">
</div>
<div class="art-Header-jpeg">
</div>
<div class="art-Logo">
<h1 id="name-text" class="art-Logo-name">
<a href="~/Default.aspx">
Super Dream Mattress Co.</a></h1>
<div id="slogan-text" class="art-Logo-text">
Dreams in Comfort</div>
</div>
</div>
<div class="art-contentLayout">
<div class="art-sidebar1">
<div class="art-Block">
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="l">
</div>
<div class="r">
</div>
<div class="art-header-tag-icon">
<div class="t" >
Menu</div>
</div>
</div>
<div class="art-BlockContent"
<div class="art-BlockContent-body">
<div class="cleared" >
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1"
StaticDisplayLevels="3" valign="top">
<StaticMenuItemStyle VerticalPadding="0px" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
</div>
</div>
</div>
<div class="cleared">
</div>
</div>
</div>
<div class="art-Block">
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="l">
</div>
<div class="r">
</div>
<div class="art-he
<div class="t">
Highlights</div>
</div>
</div>
<div class="art-BlockContent">
<div class="art-BlockContent-body">
<div>
<p>
Super Dream Mattress Co. become members of the National Bed Federation.</p>
<p>
<img alt="Super Dream Mattress Co. become member of the NBF" class="style2"
src="images/nbf_logo.gif" align="middle"
style="z-index: auto" /></p>
<p>
<br />
</p>
</div>
</div>
</div>
</div>
</div>
<div class="art-Block">
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="l">
</div>
<div class="r">
</div>
<div class="art-header-tag-icon">
<div class="t">
Contact Info</div>
</div>
</div
<div class="art-BlockContent">
<div class="art-BlockContent-body">
<div>
<img alt="an image"
src="images/contact.jpg"
style="margin: 0pt auto; display: block; width: 95%;" />
<br />
<b>SuperDream Mattress Co.</b><br />
Unit 3a Pegasus Business Park<br />
Hillington, Glasgow<br />
Scotland, G52 4TY<br />
Email: <a href="mailto:sales@kayfoam.co.uk">sales@kayfoam.co.uk</a><br />
<br />
Phone: 0141 810 4333<br />
Fax: 0141 810 1423
</div>
<div class="cleared">
</div>
</div>
</div>
<div class="cleared">
</div>
</div>
</div>
</div>
<div class="art-content">
<div class="art-content">
<div class="art-Post-body">
<div class="art-Post-inner">
<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</div>
</div>
</div>
<div class="cleared"
</div>
<div class="art-Footer">
<div class="art-Footer-inner">
<a class="art-rss-tag-icon"
title="RSS"></a
<div class="art-Footer-text">
<p>
Contact Us</a> |
Terms of Use</a
Trademarks</a> |
Privacy Statement</a><br />
Copyright © 2011 ---. All Rights Reserved.</p>
</div>
</div>
<div class="art-Footer-background">
</div>
</div>
<div class="cleared
</div>
</div>
</div>
<div class="cleared">
</div>
<p class="art-page-footer">
Kayfoam</p>
</div>
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>

View 2 Replies

MVC :: Dynamic Navigation Page In 2 Or 3

Dec 4, 2010

I've been tasked with managing the re-write of a very large enterprise application's UI. The existing UI was built upon an infrastructure which leverages the EntLib 3's PageFlow application block and the Web Client Software Factory. It performs horribly - part of the reason we need this upgrade so badly.

The problem is that these pageflows are very complex, using extensive conditional page transitions. When editing a data form, selection of a single value can determine not only what page you will reach when you click "Next", but whether a sub-pageflow is entered upon navigation instead, or a new pageflow is opened in parallel, etc. We deploy our UI in such a way where we control our API, but we allow certain licenses to purchase our UI code and extend/modify it as they deem fit. One of our selling points is that we allow the customer to "configure" or redefine pageflows using the VS designer.

In transitioning to MVC2 (or 3), we'd like to continue to offer configurable, conditional navigation throughout our various data entry page sequences. However, although I have developed the beginnings of our app in MVC2, I'm not sure the best way of implementing this data-entry pageflow "conversion". Sure, I've had my resources produce some solid designs - but all of them seem to require implementation of a complex controllerfactory. But one of the main attractions of MVC2 for me was its lightweight codebase and resultant performance gains - and I'm afraid that bypassing portions of MVC2 functionality by writing custom factories and the like will drastically reduce the performance of the app, making our UI refresh virtually worthless.

My initial thought was to write a custom filter that would implement the OnActionExecuted method. Every controller's primary POST methods would be marked with this attribute. Upon execution it would evaluate what view the user was on and look up the navigation event for that view in configuration. This config would have a default "next page"/"previous page" mapping, and can also allow for defining a type which would use conditional logic to determine the next page based on the posted model data. The actionfilter would use this type to find what route to navigate to next. I'd like to pick you experts' brains on this - does this seem like a solid design? Is it using best practices? And will it indeed perform better than a controller factory, or am I completely off-base here?

View 3 Replies

C# - Label As Dynamic Navigation

Apr 10, 2010

I Made label to had value from database and linked it . but the problem was it had only one value and i want it keep value when navigation thought site as.

x>y>z>....
this is my code
<
if (Request.QueryString["Category_Id"] != null)
{
Banar.ImageUrl = "Handlers/Banner.ashx?Category_Id=" + Request.QueryString["Category_Id"] + "";
using
(SqlConnection conn = Connection.GetConnection())
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "Navcategory";
cmd.Parameters.Add(Parameter.NewInt("@Category_Id", Request.QueryString["Category_Id"]));
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
LblNavigaton.Visible = true;
LblNavigaton.Text = dr[i].ToString();
NavHref.HRef = "ListView.aspx?Category_Id=" + Request.QueryString["Category_Id"] + "";
}
}
}
else if (Request.QueryString["ProductCategory_Id"] != null)
{
Banar.ImageUrl = "Handlers/ProCatBanner.ashx?ProductCategory_Id=" + Request.QueryString["ProductCategory_Id"] + "";
using
(SqlConnection conn = Connection.GetConnection())
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "NavProductcategory";
cmd.Parameters.Add(Parameter.NewInt("@ProductCategory_Id", Request.QueryString["ProductCategory_Id"]));
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
LblNavigaton.Visible = true;
LblNavigaton.Text = dr["Name"].ToString();
NavHref.HRef = "ListView.aspx?ProductCategory_Id=" + Request.QueryString["ProductCategory_Id"] + "";
}
else
{
LblNavigaton.Visible = true;
LblNavigaton.Text = Page.Title;
}
}

View 2 Replies

Make Dynamic Navigation Bar?

Jun 29, 2010

How I can Make Navigation bar in my site as A>E>D>S>H. I tried more to find an example also I searched more but I couldn't find particular example searched

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved