Web Forms :: From Site Master Page - Menu Disappears When Click On Any Button

May 15, 2012

I am using ASP: menu in my site.master page ' but when I clicked on any button or drop down from other page the menu is disappeared. Why my menu is disappearing from the site.master page ?

My code is :

<asp:Menu ID="MainMenu" runat="server" Orientation ="Horizontal"  CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" >
        <Items > 
        <asp:MenuItem  Text ="Home" NavigateUrl="AllEMP.aspx" >
              </asp:MenuItem>
            <asp:MenuItem  Text ="Menu" NavigateUrl ="~/Default.aspx">
                   </asp:MenuItem>
  </asp:MenuItem>
        </Items>
        </asp:Menu>

View 1 Replies


Similar Messages:

Web Forms :: Menu From Master Page Get Collapsed After Click On Print Button

Jun 25, 2012

Menu from master page get collapsed or ditrubed  after click on print buttton  from asp page

menu comes back to originally posn after click on cacel button from print page 

I refer [URL] ....

Below is example of my code 

Before Click on print button 

Masterpage
Home
Menu  
Visifire 
Print button 

page code vafter click on print button from page my page changes 

Master page 
Home 
Menu
Visifire
Print button 
page  code 

View 1 Replies

Web Forms :: When Click On A Menu, The New Page Loads Which Uses The Same Master Page, But The ASP:Menu Vanishes?

Nov 5, 2010

I have an asp:Menu control on a master page that is reading its menu items from a web.sitemap file via a SiteMapDataSource.When I click on a menu, the new page loads which uses the same master page, but the ASP:Menu vanishes. I have put some plain text next to the menu for testing, this appears on the new page but the menu does not.Does anyone know how to get the asp:Menu to remain visible on the page?

View 4 Replies

Forms Data Controls :: When Click On The Next Button To View Page The Gridview Disappears?

Jun 15, 2010

I have a small problem I am returning some data from a query and have allowed paging, however when I click on the next button to view the following page the gridview disappears.

My datasource is specified in the code behind:

<asp:Panel ID="dtpanel" runat="server" Visible="False">
<asp:GridView ID="grddetails" runat="server" AutoGenerateColumns="False" AllowPaging="True"
OnPageIndexChanging="grddetails_SelectedIndexChanged" ViewStateMode="Enabled"
onselectedindexchanged="grddetails_SelectedIndexChanged" AllowSorting="True" >
<Columns>
<asp:BoundField DataField="Col1" HeaderText="Col1" SortExpression="Col1" />
<asp:BoundField DataField="Col2" HeaderText="Col2" SortExpression="Col2" />
<asp:BoundField DataField="Col3" HeaderText="Col3" SortExpression="Col3" />
<asp:BoundField DataField="Col4" HeaderText="Col4" SortExpression="Col4" />
<asp:BoundField DataField="Col5" HeaderText="Col5" SortExpression="Col5" />
<asp:BoundField DataField="Col6" HeaderText="Col6" SortExpression="Col6" />
</Columns>
</asp:GridView>
</asp:Panel>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void GridView2_SelectedIndexChanged(object sender, GridViewCommandEventArgs e)
{
int y = Convert.ToInt32(e.CommandArgument);
Control control = GridView2.Rows[y].Cells[0].Controls[0];
LinkButton btn = control as LinkButton;
string qval = btn.Text;
string query = "SELECT * FROM Table WHERE Col LIKE '%" + qval + "%'";
string connectionString = @"Data Source=servername;Initial Catalog=dbname;Integrated Security=True";
SqlConnection accessConnection = new SqlConnection(connectionString);
SqlCommand accessCommand = new SqlCommand(query, accessConnection);
SqlDataAdapter grddetailsDataAdapter = new SqlDataAdapter(accessCommand);
DataTable grddetailsDataTable = new DataTable("Table");
grddetailsDataAdapter.Fill(grddetailsDataTable);
int dataTableRowCount = grddetailsDataTable.Rows.Count;
if (dataTableRowCount > 0)
{
grddetails.DataSource = grddetailsDataTable;
grddetails.DataBind();
}
dtpanel.Visible = true;
}
protected void GridView1_SelectedIndexChanged(object sender, GridViewCommandEventArgs e)
{
int w = Convert.ToInt32(e.CommandArgument);
Control control = GridView1.Rows[w].Cells[0].Controls[0];
LinkButton btn = control as LinkButton;
string qval2 = btn.Text;
Label1.Text = btn.Text; string query = "SELECT * FROM Table WHERE Col LIKE '%" + qval2 + "%'";
string connectionString = @"Data Source=servername;Initial Catalog=dbname;Integrated Security=True";
SqlConnection accessConnection = new SqlConnection(connectionString);
SqlCommand accessCommand = new SqlCommand(query, accessConnection);
SqlDataAdapter grddetailsDataAdapter = new SqlDataAdapter(accessCommand);
DataTable grddetailsDataTable = new DataTable("Table");
grddetailsDataAdapter.Fill(grddetailsDataTable);
grddetails.DataSource = grddetailsDataTable;
grddetails.DataBind();
dtpanel.Visible = true;
}
protected void grddetails_SelectedIndexChanged(object sender, GridViewPageEventArgs e)
{
DataTable dataTable = grddetails.DataSource as DataTable;
grddetails.PageIndex = e.NewPageIndex;
grddetails.DataBind();
dtpanel.Visible = true;
}
}

View 5 Replies

Web Forms :: Menu Like Site In Which State Is Maintained On Click Of That Link Page?

Apr 7, 2010

i am looking for the menu like asp.net site in which state is maintained on click of that link page.as if i am clicking on forums tab its showing forums tab selected.

View 3 Replies

Web Forms ::when Navigate To Other Pages Which Have Same Master Page The And Then Click On Button The Button Does No Trick?

Apr 3, 2010

I have a Master page and a user control on it.and i have a ASP Button on Usercontrol,the has to fire when ever i click on thats the default behaviour ..Now when the home page of my website loads and then i click on the button ,It works perfectly fine but when i navigate to other pages which have same master page the and then click on button the button does no trick!!

View 7 Replies

Web Forms :: Master Page Cannot Work On Button Click

Mar 22, 2011

i have a button click event on Content page nad master page have a div(popUp to login).when i fire click event of button it will check weather user is login or not..if he is login user can submit data on button click,but when user is not he will login first(login code is on master page).now after login data will be submit (with out button click v because he is click already)..

View 6 Replies

Web Forms :: Navigation Menu Disappears From Page

Nov 14, 2010

I am having a problem with my menu. My navigation menu gets created with data from different tables in a database. When the page loads after a few minutes the navigation menu disappears from page. Does anyone have had this problem or knows how to fix it?

View 3 Replies

Web Forms :: Dynamic Control Added To PlaceHolder Disappears On Button Click?

Nov 16, 2010

I have a dropdown on page, a place holder and a save button on my form.Now, I am creating a textbox on selectedIndexChanged event of dropdown list and adding it to placeholder. And on button click I want to access the control, but on click event, I find the textbox as null. Here is my code

protected void Dropdownlist1_SelectedIndexChanged(object sender, EventArgs e)
{
if (Dropdownlist1.SelectedValue != string.Empty)

And button Save click event

protected void btnSave_Click(object sender, EventArgs e)
{
TextBox txt = new TextBox();
txt = (TextBox)this.ElementPlaceHolder.FindControl("txtArea");

[Code]....

View 1 Replies

Master Page Menu Button Events Not Firing On Some Pages Only?

Aug 5, 2014

I have a master page with a menu on it. I have found now two pages out of dozens where for some reason the master page events aren't firing. I've put a break point in there and it never hits it. Is there something that could cause a disconnect between the page and the master page events? Really weird it happens in Chrome and IE but they fire correctly in Safari.

View 12 Replies

Information Disappears On Button Click?

Jul 13, 2010

I have a ListView that has a FileUpload control and a button in each ListViewItem. I have an OnClick event on my button where i try and pull information from the FileUpload control, but when I try to access the control all of the values that were set are gone (FileName etc).

What do I need to do differently here to access the information I just entered?

<asp:ListView ID="lv_Uploads" runat="server" OnItemDataBound="GetThumbs" EnableViewState="true" >
<LayoutTemplate>
<div id="itemPlaceholder" runat="server" />
</LayoutTemplate>
<ItemTemplate>
<div style="width:500px;>.......

Code behind:

protected void SaveFile(object sender, EventArgs e)
{
//This always evaluates to an empty string...
string myFile = ((FileUpload)((Button)sender).Parent.FindControl("fu_Upload")).FileName;
}

View 2 Replies

How To Update A Div Tag In Master Page Using A Button Click In Content Page

Mar 3, 2010

How to Update a div tag in Master Page using a button click in Content page? or Wise versa

View 1 Replies

Search GridView Disappears On Navigate Button Click?

Jun 22, 2015

On my Form I have 2 gridviews namely; gvCRSearch (that displays search results) and gvCRView (that displays all the change requests raised).. Now, when the records are more than 10 in gvCRSearch it automatically creates a navigation number i.e., 1 2 3 Same thing happens to gvCRView

What is wrong is that when I click the navigation i.e., ( for example 2) on gvCRSearch

1) the gvCrSearch becomes visible = false

2) the gvCRView if it has a navigation number is moved to 2

So the effect is seen the next view (gvCRView) and the gridview (gvCRSearch becomes invisible)

the asp is as shown;

Code:
<asp:GridView ID="gvCRSearchView" runat="server" ShowHeader="True" AutoGenerateColumns="False" DataSourceID="CRSearch"
BackColor="White" BorderColor="#600000" BorderStyle="Solid" BorderWidth="2px" CellPadding="3" Font-Size="89.5%"
ForeColor="Black" GridLines="Vertical" AllowPaging="True" PageSize = "10" AllowSorting ="true" CssClass = "MainGridView">
<Columns>

[code]....

View 1 Replies

AJAX :: Chrome Update - Toolkit TabContainer Disappears On Button Click.

Sep 10, 2010

Yesterday (Thursday Sep 10th 2010) I was happy to have a TabContainer working fine on a simple page as im learning to use it.

On the page was:

1) Ajax Script manger.
2) 1 command button (it would make label1.text = "hello world"
3) A Ajax TabContainer with 2 tabs...
4) Label1

That was it and it was working fine in Chrom and IE Woohoo.. I go home...

This morning I load it up to keep working way and doing more with it.... Chrome is my default browser, it loads and I click tab2 then tab 1 all is well.... I click Butto1 and the hole TabContainer disapears..

After much dinging I find it still works in IE but that my Chrome has updated (on its own): (I notice only one ICON in Chrome in the uper right corner by the addres bar... Only the Wrench ICON, No more Page ICON.. So I check and sure enough Chrome did a push to V 6.0.472.55.. Anyhow thats the difference and now TabContainer goes poof/disappears when clicking a button that refeshes the page.

View 21 Replies

C# - Usercontrol Code Behind Never Executed And Disappears When Click Button Inside Updatepanel

Apr 1, 2011

i have a usercontrol inside an updatepanel. when i click some button this usercontrol will be loaded. and the usercontrol itself has anither button in it. the problem is that the usercontrol code behind is never executed and when the button is clicked the usercontrol disappears.

View 1 Replies

AJAX :: DropDownList Inside Updatepanel Disappears For A Second And Reappears On Click Of Any Button...

Mar 30, 2010

In Visual Studio 2008 ,in my application page 'TEST.aspx' have an 'Ajax TabContainer' inside update panel , and Tab Panel "Product Group Identification" containes textboxes ,DropDownlist and button like 'Save' and 'Cancel' , on clcik of 'save' or 'cancel' buttons only dropdownList Disappears for a second and reappears this is due to Update panel.

Below you can find my sample code

[Code]....

View 4 Replies

Web Forms :: Menu Control Click Event Not Firing / How To Pass The Selected Menu Item Text To The Other Page

Jan 10, 2011

I am using frames in my webpage.in one of the frames i have a menu control whose items are database driven.when click on the menu item, i want another page to be displayed in other frame.

now i want to pass the the selected menu item text to the other page using session variable which is in the menu item click event method.but the thing is when i click on the menu item, the click event is not firing.

is there any better way to pass the selected menu item text to the other page?

View 1 Replies

Web Forms :: Master Page (site.Master) File That Now Contains Nothing But Hex Code, Mainly 0's And 1'...

Feb 3, 2011

My computer system froze on me, the mouse froze, cntrl-alt-del, did nothing, so I reset it. Did a disk check, and now everything seems fine except for my master Page html code which I was in the middle of editing when it happened. The VB code-behind file is still ok, the designer file still shows ok with all of the controls in it, but I can't get into desgn or source view. It just opens and gives a whole page of hesixecimal code such as as:

00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

It just gives me a whole page full of numbers like this. I haven't backed up for a few weeks and so I hope I can get this back.

View 3 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

MVC :: Create A Dynamic Field In The Master Page (site.Master)

Oct 10, 2010

I'm starting with ASP.NET MVC (1.0). I have a problem to resolve. I have developed a web applicaton (an application of articles like e-commerce) with a head (logo and menu). I have defined the head (logo and menu) in the Master page (site.master). Now, I must display the number of articles in the head in a field (like the number of articles in the virtual basket in the e-commerce). I can read the number of articles in the data base (in the controller), but i can't integrate it in the master page.

View 1 Replies

Web Forms :: How To Use StaticSelectedStyle In Menu Control With Master Page/Content Page

Jan 14, 2010

I have a MasterPage where I use the menu control. Clicking a menu item loads a new content page. That part works fine.

I would like to use staticselected style to change the look of the selected menu item. However, when the new content page loads, the staticselectedsyle formatting does not work.

View 6 Replies

Web Forms :: Disable Master Page Menu From Content Page

Dec 16, 2010

I have asp:Menu on Master page like:

[code]

On content page (Login.aspx), I got Uesr Type. For Admin type only, I need to show the above bold menu item. No problem for getting User Type as "Admin". Just problem is that, how to visible/in-visible or enabled/disabled above bold text menu item?

View 3 Replies

Web Forms :: Master Page Menu Appearing Behind Content Page?

Feb 22, 2010

but I've tried everything I could think of and am at the end of my rope. I've got a page (faithfamilychurch.com/v2aspx/Default.aspx) that I am trying to get the flyout menu and flyout quicklinks at the top to come out over the contentPage content. I've set the z-index of each to much higher values than the content page, but still nothing. I've tried the tactic of changing the contentPage z-index to -1, but there is some master page content that needs to appear behind the contentPlaceHolder. Code below.

Master Page:

[Code]....

Content Page:

[Code]....

CSS:

[Code]....

View 2 Replies

Web Forms :: Disable Master Page Menu From Login Page?

Mar 21, 2011

I Have a login page and I want to disable the menu options from my master page.

I have come across the following code:

[Code]....

But when I put this into the page load it gives me syntax errors stating menu is a type and cannot be used as an expression.

View 2 Replies

Web Forms :: Menu Creation In Master Page?

Aug 6, 2010

creating a menu for a website. I am using asp.net and ajax css javascript....

View 5 Replies







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