AJAX :: How To Keep Track Of Which Tab The User Has Selected
Jan 15, 2011
using vs2008, asp.net, c# .net3.5 In this control;s ActiveTabChanged event, the ActiveTabIndex property stays 0 no matter which of the 3 tabs I select. Why is that? I want to keep track of which tab the user has selected and store this in the seesion variable so when refresh or bookmark by the user is would done properly. I was advised to possibly do this by saving the ActTab instead of the ActiveTabIndex. The problem then is how do I set the ActiveTab of the Tabcontainer, I mean how do I cast the Seesion variable so I can assign it like tabScien.ActiveTab = (castType)(Session["SavedActiveTab"]);
I'm making a small portal in ASP.net (with C#.net4) where users can login and add, edit their personal information (PI). But I don't get how to load information (stored in a SQL server DB) in the page when a specific user is logged in.
For example: If Sam is logged in, he can view his PI. When Vicky is logged in, she can view her PI.
The Register action gets called in the Account controller, showing the RegisterViewModel in the Register.aspx view. The form in Register.aspx is submitted/posted with answers to all of the form questions, except for the security question answers. If the user is created successfully, then I'd like to go to the GoToSecurityQuestions view using the code - return RedirectToAction("GoToSecurityQuestions", "Account"); I need to be able to keep track of the user name or ID of the newly created user so that I can persist the security questions to the database records related to the user. What's the best way to keep track of the user info between the [HttpPost] Register( ) and the [HttpGet] GoToSecurityQuestions( ) ?
[HttpGet] public ViewResult Register() { return View(new RegisterViewModel()); }
how can I know that the user already selected a file in the upload control, basically I need something like an event when the uploadfile control already have the filename, since I want to upload inmediately without having a second button that the user would need to click so the program can do the SavAs, I want to do it automatially after the user selected the file with the upload control.
I am trying to display selected file to a user right after he selects. Which means I have to save it to a temp location and change image src (or ImageUrl if we are talking about asp:Image).
And I am trying to use AsyncFileUpload (from Ajax Toolkit) for that. Apparently it has "OnUploadedComplete" server event, but sadly it isn't working.
My intention is to give the user a flexible user control on a master page that does the following:
When navigating, a child page will pass the URL (with querystring) and PageTitle to the user control. The user control will take those two parameters and insert them as a "breadcrumb" object at first index of a List<breadcrumb> collection
This part works fine through the use of a Repeater with a LinkButton contained in an ItemTemplate. The user sees each of the pages he has been visiting in descending order, the provided benefit is a quick way to re-open records they have recently modified or created.
The part I'm having trouble handling is what happens when the user clicks the LinkButton, which is that the child page adds a new reference to the URL at the beginning of the List<> collection and I cannot seem to control the behavior of removing the LinkButton before it gets re-created. What I've tried doing is:
While that should work, my CreateBreadCrumb(string url, string title) function gets called by the child page before the UserControl detects the Repeater1_ItemCommand event, so in effect it appears that the wrong ItemIndex is being used for removal.
Since I am new to Ajax control kit so thought to ask this question,I need to know what controls should i use for the following requirement.I've a state Drop down on selection of state drop down i would like to display all city of selected state in check box so that user can choose multiple cities and would like check box control to display only 5 city name per row for example if there are 10 cities in one state it should show 2 rows with 4 city and one row for 2 city.
I have a textbox in my form wich has an ajax autocomplete extender. I could load the list , my problem is i need to get the ID of the selected list item and based on the selected item load few controls. the following is my code
[Code]....
all i need is a way to get the selected value to the hidden field (hdnReceiverID) when i tried with text changed of the text box it doesnt give the value.
Is there another way to track the selected item change ?
I have several pages, let's call them A, B and C. Each of these pages has a form where the user can type in some information and click a button to send those information to the server. This button click is performed in an UpdatePanel to prevent a full postback.
A customer of ours now wants to know how many % of the using visiting each site (A, B and C have different URLs) use this form. (Meaning I need seperate values for A, B and C) How to I track this in Google Analytics? It seems that I have to create a conversion(??) for each page. Is that correct?
How must I modify the existing web application to let Google Analytics know, that a user submitted the form. (without the need to redirect thank to xy amount of different thank you pages)
i have read your article on aspsnippets.com. Multilingual Website and i have implemented that i works good .but there is new problem arrising. suppose my default language is english set in internet option so the whenever website reloaded or redirected then all content will show in english language but
when i changed it to hindi then current webpage converted to hindi but after that if i pressed any button on current page or i redirected to any other link of particular website then again hindi is converted to english.
I am using ASP.Net 3.5. I have fiiled dropdown list in javascript using ajax service but unable to get its selected value in button click event on server side.
Is there a way to programmatically select the entire string of the selected item in the AJAX Combobox?What I'm trying to do is bascially on a State/City selection.
1. User selects a State from the first combobox. This triggers the City combobox to be populated. The item(0) is "Select One:".
2. I want the entire "Select One:" to be hightlight as if the user had used their mouse and highlighted all the text.
The reason for this that I'd like the user to be able to start typing the city without needing to clear out the "Select One:" manually.
I dynamically load user controls from a default page but when a postback fires within the user controls I can’t get the selected user control to reload. Hard to explain so I will try to show you what is going on.
[Code]....
When I enter my name and click the “Answer” button the page reloads back to the original state with no user control loaded. Why is the “Hello.ascx” user control not loaded with “Lable1” populated with the information for the click event from the code behind event?
I have a web user control (ascx) that exposes an "ID" property. What I want to do is set this property when the SelectedIndexChanged event fires in a gridview in the containing page. However, I can't seem to do it.... Here's my code:
I have a simple ASP.NET web site with membership (using SqlMemberShipProvider). I allow users to select a theme to setup a design of the pages they like.
Now the question is: Where shall I store this selected theme per user?
My initial idea was to use profiles. So I have defined a profile property called "Theme" in the web.config file. All this works so far as long as the user has logged in to the web site.
But there remains one open point:If the user isn't logged in and enters the login page how can I make sure that he sees the login page with the theme he has selected before?
Obviously (at least I think it's obvious) I cannot pull the theme of the login page from the profile of that user as long as he hasn't logged in.
So how can I overcome this issue? Is it perhaps the wrong place to store the theme in the user profile table? Should it be better stored somewhere on the client PC of the user?
I want to show a PDF in browser, from which user can select text, showing pdf is very easy i have done this using "pdfviewer" control, now i want to get the selected text which the user selects in the PDF, is there any way to achieve this? i am using asp.net
I have a survey form, survey.aspx, that looks for information about 3 different people (hiking guides) who are all contained in a single DropDownList. Instead of repeating the list over and over, I figured I'd put them all into a single user control, GuideList.ascx, shown here.
[Code]....
The form has 3 instances of this User Control. Here’s what the first one looks like:
[Code]....
In trying to access the value the user chooses from the DropDownList, I have created the following code in GuideList.ascx.cs
[Code]....
In Survey.aspx.vb, I have the following, that often blows up because it doesn’t like G1:
[Code]....
I have tried using GuideList1 and GetGuide and GuideList1.GetGuide and GuideList1.G1 and all sorts of variations, but cannot seem to figure out what I'm missing to access the value of the DropDownList.
I am developing an ASP.NET web application that incorporates google maps. I have an ASP.NET listbox on my page which contains a list of items. When the user selects one of the items, I'd like to show this item on the map. The main complication lies in the fact that google maps uses javascript to control it and the listbox is a server control.
I can think of two ways to do this. The first would involve the listbox calling a javascript function when the user selects a new item. I can then write this function to perform the necessary map operations. Unfortunately, the OnSelectedIndexChanged property of the listbox doesn't seem to support javascript functions.
The second involves wrapping an UpdatePanel around the listbox and getting the listbox to perform a postback. In the SelectedIndexChanged event in VB/C#, I would the need to somehow make a call to a javascript function which would then update the map.
I have created a user control that contains two asp calendar controls. I need to add this user control twice on the same asp page, let's say for Check in date and Check out date. Since the two are conflicting to each other when I add it twice statically, I now dynamically add them on button click so that each time only one control is loaded. The problem is, when I select a date on a calendar, it seems that the selection event is not happening at all. Of course, I am not getting any date.
change details of a user ( asp.net membership change email of a selected user ).
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Protected SubButton4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.ClickTry Email = EmailTextBox.Text Membership.UpdateUser() updateuserlabel.Text = "User e-mail updated." Catch u As System.Configuration.Provider.ProviderException updateuserlabel.Text = MessageEnd End Sub
This works but what is does is to load the email of the user that is login to the textbox and then if i press the button it changes to the text assign to the textbox.What i want is to choose from all the system users and then change the email of each.