I have a ddl that controls the visibility of a textbox (using panels). For example if i select 'Other' from the text box, a post back occurs and a text box appears beneath it for you to give further details. If any other value (for example 'dry') is selectedit's an accepted value and nothing else happens. Only problem is that if i select other, add details the text box and then go back and change the value to 'dry' (for example) the text box may dissapear but the value is still held within the box
I have a page with a text box, a button and a GridView. Enter an account number in the text box, press the check button and the result will show in the GridView.
Now user wants that if the text box is clear, the GridView disappear.
I can only find TextBox1_OnTextChanged. But I want to have that while the user is clearing the text, if the length of text becomes zero, the GridView is clear out. So I am looking for OnTextChanging(). Well of course this function does not exist. How to achieve the same purpose?
I have a scenario whereby I have a textbox with an autocomplete extender attached and two drop down lists; this enables a user to search for product info. Ideally I'd like to create something that effectivley, 'resets' the drop downs so that when a user clicks on the textbox (maybe I'll do it 'onenter'/'ondelete' if there is such a thing). I've had a look at .Attributes.Add but cannae figure it out. How do you include asp.net controls within this scenario so I could have something along the lines of:
I am new to ASP.Net development, trying to develo pa simple access based library system.
I am using panel to place a few textboxes and buttons on it, on page load, i open db conenction and bound textboxes to recordsets to show data (and navigate using first and previous buttons)
On add button I call a function to clear textboxes, so user can input data, then when i try to write the data back in DB it shows me textbox still showing old record from record set, means "textbox.text="" didn't work.
and I'm trying to clear the dropdown lists and the text box but also still give the thankyouLabel.Text message back to the user to give them some idea that their data has been submitted. I know that with a response.redirect that you're doing a postback but what I'm wondering is if there's a better way to clear a form so I can give users a clear form and also my thankyouLabel.Text message.
hope somebody can help with this issue as I've been struggling for days to work out what I've done wrong. Basically, I have a gridview that I've attached a small pop-up form to edit just the fields that I want editing (rather than all of the fields from the GridView). The update works OK in that the data is written back to the database OK and the pop-up form closes. However, the view of the gridview isn't returned and everything is as though the pop-up form was still there. The only way around it seems to refresh the page. The front-end is like this:
I am designing a web page that allows for the maintenance of a single table - so I have some controls that allow the user to specify some search parameters, a button that then populates a gridview with the result of the search meeting the search parameters, and a details view for inserting and updating specific records. The gridview and detailsview are bound to appropriate sql data sources.All pretty standard.There is also a "reset" button that clears the results of the current search - sets the visibility of the gridview and detailsview to false, and clears the search parameters. Again, pretty standard.What I have done is when the user goes to insert a new record, the gridview and search parameter specification controls are hidden, and the details view displayed. If they cancel the insert operation, the details view is hidden, and the search parms and gridview displayed - but what I am finding is that there are situations when a previously populated gridview is displayed. Here's the situation:1) Specify some search parameters, click search - and the gridview appears, with the appropriate records displayed.
2) Click on the clear button (oops - I didn't want to search, but add a new record). The gridview disappears, the search values are cleared out.3) Click on the insert button - the detailsview opens in "insert" mode.So far, this all works well, and is intuitave to the users.4) Click on the "cancel" button on the details view. I hide the details view, and show the gridview and search parameters. The gridview appears - with the results of the previous databinding still in it.My question is: Is there an easy way to "unbind" the gridview? From my understanding of how the datasource to gridview (or detailsview) connection is done, there is a datatable "behind the scenes" that manages the two way data binding. I also assume that data that has been bound to a gridview is carried over in the viewstate - it would be nice to clear out unneeded data in that.
I have a gridview which at run-time contains X number of records. Upon clicking a DELETE linkbutton on a particular row the gridview completely disappears from the page, when it should reflect simply the loss of that one record. Everything is okay on the database end, the record is deleted, so I know that part is working. I run a query and rebind the gridview within the Rowdeleted event. I even try hardcoded a value in the query which I know exists in the database and it still doesn't refresh with this record showing. Whatever code I need to post, let me know.
I m facing a problem in clearing user name and password fields saved in IE and FireFox. I tried Assigning empty string to my text boxes on page load but that didt worked. The only way that worked for me was to assign " " space to my text boxes. But that way on tab event mu cursor is not moving to next control rather it first removes space from text box and then moves to next control. I need to fix this ASAP, Can any one help me out with this.
I have a web form with about 43 textboxes....currently if the use clicks cancel...all the textboxes are assigned an empty string. That works but what i really want i a better way to do this instead of having each textbox listed.
i have a simple ASP.NET 3.5 page with a Radiobuttonlist with 2 items (Yes/NO). there are also 2 Buttons. The 1st button has a client side jQuery code that clears the selected value in the radiobuttonlist. The second button just postback the page when clicked and has no event handler.
Now, everything works fine, so when we select a value in the radiobuttonlist (ex: Yes), then we click the 1st button, the value is cleared, and clicking on the 2nd button, the page posts back and the radiobuttonlist control will not have any value selected. (That's GOOD for now).
Now, if we attach the textChanged or SelectedIndexChange events to the RadioButtonList (with no server side code in them), and repeat the above senario, what will happen is that after postback, the radiobuttonlist value will NOT BE CLEARED, and it will revert to the last selected value before postback. This is very weird. I don't know why it behaved like this.
I have code that another member assisted with and is working great. Now that the page is working more and more like it should with the remaining requirments. I have something else i would like to implement.
Since the code i have automatically creates / generates a table with textboxes and labels based on a drop down selection. I would like to know how to clear the textboxes if they chose 0 from the dropdown. Or if they select "No" on the radiobutton, then that means they have nothing to provide, so i dont want to capture something that they may have entered before changing their mind.
Here is the code the generates the tables and textboxes, i just need to setup, so that if they select "NO" from the radiobutton or if they select "0" from the dropdown that the textbox values, if any, are cleared so that we dont get inconsistant data captured.
I have MVC 2 site, and I.E is cacheing word documents linked on my site. I know there is a way to clear cache before every action in the controller. But for these links i am not using action, i am just creating regular href links.. Is there anyway i can clear the cache?
These are typically forms where some lookup data are drawn from a database. These data change rarely, so the cache duration is typically set to 24 hours. Anyway, my question is: when the sql server is updated with new data in this area, is there a way of forcing such pages to "refresh" rather than keeping the cached output? Or if this cannot be done, is there at least a way of clearing the whole cache for the website?
Is it possible clear ReturnUrl from the server? I have a login page where the user logouts and I want to direct them to a specific page but when ReturnURL is set it overrides my redirect page.
Update:Ideally, I will only redirect a user who has just logged out versus someone who has bookmarked OR I will redirect regardless in special cases.So these are the cases:A link or bookmark -> should redirect to specified page in most case.A logout that has a returnurl -> should NOT redirect to the page,A special case -> should always redirect to my special case, i.e when a user needs to see something important
Is there a way to remove the returnurl from the logout/login status control?
The code below tries to clear the cookies for all domains once a user logs out of the system. For some reason, only the last domain in the array is cleared. Why does this happen? Am I doing something wrong?
For example, if I change the size of the array to 4 and then change the for loop to only go to 3, then it only logs me out of y.xcv.com.
As a sidenote, I have this loop working on a different server that uses a slightly different function to clear the cookies.
Edit: Code updated per suggestions below. Now it fails on the "as HttpCookie" line. Do I need to include some library?
Dim aDomain(12) Dim ESidCookie, WIdCookie, EBidCookie, TSidAccessCookie, PSidAccessCookie, SSidCookie As HttpCookie