C# - Enable Disable Tabs In A Tab Container?
Sep 1, 2010
I have a tab container in aspx page and i want to enable disable the last tab in aspx page my tab container is like below
[Code]....
Now for disabling the last tab i used the following in code behind page load:
//tabAdvanceSettings.Enabled = false;
I also want to enable this tab panel on client side when a user uses a shotrcut like Ctrl + Shif + A as shown below but this shortcut only enables the tab not the two user controls ptresent in the last tab. The code for enabling the last tab is :
if (e.keyCode == 65 && isCtrl == true && isShift == true) // Ctrl + Shift + A
{
$find('<%=tabContainer.ClientID%>').get_tabs()[2].set_enabled(true);
}
How can i enable the last tab and also the controls present in the last tab?
View 2 Replies
Similar Messages:
Jun 24, 2010
I'm running into a weird issue.. Basically, a user logs into a page and based on his role status(admin or user) determines how many tabs he sees in a tabcontainer. If he is just a "user" then tab index 0 and 1 need to be hidden because they contain admin only functionality.
if(user)
{
Container.Tabs[0].visible = false;
Container.Tabs[1].visible = false;
}
However the problem is if I set more than 1 tab index to visible = false the entire container disappears. Could this be a bug? I know you can only have one tab visible at a time.
View 2 Replies
Jun 4, 2010
I need to change the order of some tabs in a tab control, how can achieve this?
View 4 Replies
Jul 16, 2010
I have a web page with two tabs, "Release Inventory" and "Recreate Pull Sheet". I am using a tab container and tab panels. It looks fine in the design view but as soon as I view it in a brower the tabs don't show up. All I see is the Header text for the tabs. It looks like this:
"Release InventoryRecreate Pull Sheet"
You can click "Release Inventory" or "Recreate Pull Shee" and you will see the information in the tabs, but the actual tab appearance is not showing up.
Here is my code:
[Code]....
View 5 Replies
Apr 26, 2010
I'm trying to get a page working using a tab container and multiple tabs. So, I created a new blank page and pointed it to my master page. The master page has two content panels within it.
I'm adding the tab container in the top conent holder, but when I go to view the page, I get an error. Below is the error followed by the code.
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Description:
An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Source Error:
[Code]....
Stack Trace:
[Code]....
Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3082
[Code]...
View 1 Replies
Mar 2, 2010
I have a page with 4 fixed Tabs. Tabs 1 and 2 are always in position 1 and 2. However, the users are allowed to create their own tabs and add their own html content. I do this by creating a new tab in codebehind and inserting it into the tabcontainer AFTER the frist 2 and before the last 2 tabs. There could be several of these. EX: "F1 | F2 | U1 | U2 | U3 | F3 | F4" where F is a fixed tab and U is a custom tab.
As long as ALL tabs are visible then everything works fine after postbacks.
Based on user settings I sometimes hide fixed tab 1. Everything loads fine the first time. However, on postback The content on fixed tab 4 (always the last tab) is displayed on the bottom of EVERY tab (fixed or custom). It is still displayed in fixed tab 4.
A little background on the code:
Since the tabs are added dynamically they do not exist on postback and must be re-generated every time. This is done in Page_LoadComplete. I have tried it on PageLoad and it behaves the same way.
If I do not re-generate the pages on post back then the problem goes away - as do the custom tabs.
The only thing I could find was from last year, and was supposedly fixed (http://www.codeplex.com/AjaxControlToolkit/WorkItem/View.aspx?WorkItemId=16321
View 1 Replies
Feb 24, 2010
I have sqldatabase tables.I am reading table data and putting in a tabconatiner(wth tabs containing textbox, checkbox etc) specific to a client. If a client has more than one row i want to iterate through the rows and read each row data. Basically I want to use a button-click to read the next row data at put it in the tabs and so on. I used sqldatareader and a while loop.I can read the data but while loop iterates through the rows and show the last row data / i want to use a button to go to the next row and show data.
SqlDatareader reader=null;
reader=cmd.ExecuteReader();
while(reader.Read())
{
txtboxName.Text=reader["Name"].ToString();
}
protected button_Click(Object sender,EventsArgs e)
{
//I want to read row data in this button click
}
View 8 Replies
May 17, 2010
I am trying to disable history and properties tabs from my report manager for some users.
I've been looking for advice on the internet but did not find anything about this.
View 2 Replies
Feb 4, 2010
I have set the ajax tabs disable on form load. ON button click, I want to enable the tab server side,not client side.
protected void btnEnableCostPetroleumTab_Click(object sender, EventArgs e)
{
TabContainer2.Tabs[0].Enabled = true;
}
But its not enabling the tab?
View 12 Replies
Sep 15, 2010
I'm trying to create a setup in my ASP.NET website that allows me to enable/disable logging while the application is running at any point. I figure some of you have already done such a thing.
Here's the gist of what i'm trying to do:
if(ShouldBeLogging)
logger.Info("helloooooo there");
So how would you set up the boolean value ShouldBeLogging to be able to be turned on/off while the website is running without getting any serious performance drawbacks(seeing how its going to be accessed frequently)? I was thinking about putting something in the web.config, but wouldn't a change to that kick my user sessions if i wanted to turn it on?
View 3 Replies
Dec 19, 2010
I would like to disable or enable DIV section on asp.net MVC form :
if dropdownlist selected value ="Univ" then I enable div section else I disable div section
the div section to Disable and enable is EnableFacultéOrUfr
[Code]....
javascript function
[Code]....
View 7 Replies
Nov 15, 2010
using c# I am entering two types of string in a text box for eg "so-123456" or "12345678" only this two formats are allowed to enter, when i enter only 12345678 i.e, without "so" next textbox in that page should be enabled, if i enter "SO-123456" textbox should be disabled. without any click event i.e, while entering text in 1st textbox if it contains "so" textbox2 should be disabled, if textbox1 contains only integer(123456) textbox2 should be enabled.
View 1 Replies
Apr 13, 2010
I am using template field in a Gridview. I have a button in that. I also have a method which returns bool. Now I want to disable the button in the gridview if my method returns true. And enable the button if my method retuns false.
View 5 Replies
Oct 5, 2010
I am rather new to MVC applications, and one thing I am trying to accomplish is enabling or disabling stylesheets based on a Session value.I have stylesheets referenced in my Site.Master page in this manner:
<%=Html.Stylesheet("~/styles/main.css", "string")%>
<%=Html.Stylesheet("~/styles/additions.css", "string")%>
<% if (Session["cssRule"] = "enableCss") { %>
<%=Html.Stylesheet("~/styles/main.css", "screen")%>
<%=Html.Stylesheet("~/styles/additions.css", "screen")%>
<%} %>
So if the 'cssRule' Session value is null, no CSS loads. Currently this is working fine, but it is not exactly what I am looking for. Right now I set the Session value in the Controller when the user logs in, but ultimately I need to set the value of theSession variable depending on if a user clicks the enable or disable button.
View 8 Replies
Dec 14, 2010
I have a checkbox and a textbox in a GridView (for every row), and I'd like to be able to write some javascript that would enable and disable the textbox depending on the state of the checkbox (checked or unchecked). I guess I'd have to give JS the row index somehow.
View 3 Replies
Feb 22, 2011
I am developing a registration process in an MVC application. The process consists of 4 steps. I would like users to be able to see where they are in the registration process. i.e. I would like them to see a breadcrumb with each step displayed. If a user is on the first step, they should see all 4 steps displayed but only the first step should be enabled. If they are in the second step, they should only see the first and second steps enabled etc. The first link would take them back to the first step. I have considered using 4 action links to implement this. Is this the best way? If so, how do I disable and enable actionlinks?
View 6 Replies
Jan 9, 2010
I have a tab container and three panels
<cc1:TabContainer
ID="TabContainer1"
runat="server"[code]....
In my first panel I have a asp:checklistbox, which is dynamically loaded with items ....
Eg: [Code]....
One checkbox item = "Address"
Second checkbox item = "Work Info"
When User selects and clicks on first Checkbox option Address...the second Tab is enabled
When the User Clicks on Sec Checkbox option Work Info then the third Tab is enabled .else the tabs are disabled
I was working to use JQuery and unable to achieve this
My Jquery Part of the code is like above...looks a little too complicated
View 1 Replies
Nov 23, 2010
How to enable / disable any record in gridview ?using mssqlI want in my gridview the following will appear ..
Name Course Year Status
Sam MCA 2010 Enable
when i click on enable then record will be displayed in gridview and the enable button will convert into text disable... and when i click on disable then the record will be disable in gridview and enable button will appear ...
View 1 Replies
Apr 6, 2010
I have a text box, a range validator, and a button. The validator is hooked up and prevents the button from doing a post back if the text is out of the range, however I'd also like to enable and disable the button. Is this possible to do within client-side code?
View 12 Replies
Feb 12, 2010
I been strugling with this for 2 days now without comming any closer to solution. I have read 20-30 threads alteast and stil can not resolve this.I have disable anonymous authentication, enable asp.net impersonation.I have added <identity impersonate = "true" />I have added the a user to the security logins that is connected to the database I try to connect tThis is the connectionstring I use:
Data Source=IPTOSERVER;Initial Catalog=Phaeton;User Id=User;Password=Password;errormessage
View 6 Replies
Apr 26, 2010
How do I validate RequiredFieldValidator/CompareValidator conditionally. I have aded equiredFieldValidator/CompareValidator on date textbox. I want that if textbox1="No" thne it should not validate or compare date text box, if textbox1="Yes" then it should validate.
Is this possible on form submit button or any other way?
View 4 Replies
Sep 2, 2010
I'm trying to set all textboxes on an ASP.NET form to disabled on Page_Load using the following:
[Code]....
View 6 Replies
Jan 18, 2011
I am trying to put in scripts for google analytics in my code. But I want it to run only if the environment is production and not in dev or qa. This javascript runs at page load itself and I am confused how to make it run conditionally. My app is an asp.net app.
Javascript is always confusing to me. There are many other javascripts in the page and I just need to disable this one. Had it been a .net code/function I would check for the environment and conditionally run the function. But I am confused about how to accomplish this type of functionality with javascript
View 4 Replies
Jan 28, 2011
I have a scenario where a RadioButtonList needs to be in disabled mode by default and then on some event on client side, say, when a checkbox is checked, it needs to be enabled.
But once I disable it from code-behind, the javascript part of enabling it doesn't work.
View 1 Replies
May 10, 2010
I have a webpage that inherits a masterpage. Within the webpage I have the content palceholder and then a table within that that contains all the controls of the page. Like below:
[Code]....
I want to be able to change the fields to readonly if a field in the database for the user says they should have readonly access. I can't seem to find the level to go to in order to loop through the controls of the page to set their access to readonly.
I have gotten down to this level and it seems like it is in the base of this.
WebForm.Page.TemplateControl
View 3 Replies