.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to tell if TextChanged fired in response to user input

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :WPF
I have a TextBox that triggers a calculation when the user types text.  I am recalculating any time that the user enters a new value by responding to the TextChanged event.  This calculation can be manually overridden. I am finding that the TextChanged event is firing during databinding, as it should, but this is blowing away the manually overridden calculation.  I used to be able to tell if the user had initiated this change by checking the Modified property in a System.Windows.Forms.TextBox. Is there a way to tell if the TextChanged event is in response to user input?  I only want my calculation to take place in response to user input and not in response to databinding or other in code changes to the Text property.

View Complete Post

More Related Resource Links

InfoPath: Turn User Input into XML with Custom Forms Using Office InfoPath 2003


Office InfoPath 2003 is a new Microsoft Office product that lets you design your own data collection forms that, when submitted, turn the user-entered data into XML for any XML-supporting process to use. With an InfoPath solution in place, you can convert all those commonly used paper forms into Microsoft Office-based forms and end the cycle of handwriting and reentering data into your systems. Today organizations are beginning to realize the value of the mountains of data they collect every day, how hard it is to access it, and are striving to mine it effectively. InfoPath will aid in the design of effective data collection systems. Here the author shows you how to get started.

Aaron Skonnard

MSDN Magazine September 2003

Programmatically creating a SharePoint Site based on user input


I am working on developing a “Create Website Wizard” for SharePoint 2007 that would do the following (I am simplifying a little for the sake of this post):


1.      Take user input as follows:



Product Code:

Category (I, II, III):

The category will be a choice field (radio buttons or a dropdown)

how to include a user defined table type as input for stored procedure

Hi ,  I have a user defined table type which i need to pass as input parameter to the stored procedure .How can i do that?

Storing and displaying user input (encoding query)

Hello,I've just been reading up a little on security regarding user input and how to handle html and scripts.My question is, what if I build my own CMS?Isn't it inevitable that I'll want to store html code, possibly scripts, and almost certainly apostrophes and special characters, and then display them again.What's the best way to do this, since I wont want to display the encoded html, but the html itself.Would it be to encode everything then when I want to actually display the html, decode it, but everywhere else, keep it encoded?I'm just trying to think of all the scenario's that I could come across when I accept user input where I don't know what they could be typing in.What if I WANT the user to be able to display html?Is it possible to decode only some tags but leave all other tags encoded? 

Getting user input from a ComboBox

What is the most reliable way to get the current user input from a ComboBox? I've noticed that SelectedItem.Text, SelectedValue, and Text all contain the wrong result when the user deletes everything in the box and then immediately does something to cause a postback without clicking outside the box first (e.g. the user presses Backspace to delete the current contents and then presses a Submit button without clicking on anything else in the form first).

How do I gather user input at the start of a workflow?

I'm a complete sharepoint newbie, so please forgive me :) I have developed a Sharepoint 2007 Sequential workflow in Visual Studio 2010. I have 'bound' it to a particular contact list, and set it such that it will be activated when a contact is edited. (I did this so that I had an easy way of starting the workflow (I just go in and edit a contact)). The workflow itself, on the designer just shows: onWorkflowActivated1 -> codeActivity1 -> logHistoryListActivity1 The workflow works and does the work in the codeActivity1 part. My problem now is how to ask the user for input. At present the code has some hard-coded values in it, for example: Dim emailTemplatePath = "http://en-ecm-jplender/Shared%20Documents/FATF%20Documents/EmailTemplate01.htm" Dim emailTemplate = (New System.Net.WebClient() With {.UseDefaultCredentials = True, .Encoding = System.Text.Encoding.UTF8}).DownloadString(emailTemplatePath) Dim attachmentFilePath = "http://en-ecm-jplender/Shared%20Documents/FATF%20Documents/People.pdf" Dim attachmentData = (New System.Net.WebClient() With {.UseDefaultCredentials = True, .Encoding = System.Text.Encoding.UTF8}).DownloadData(attachmentFilePath) However, I'd like for the user to be able to choose the PDF attachment, and the EmailTemplate document from Sharepoint. I tried fiddling with InfoPath, but it didn't seem to bind to t

Popup Confirm that forces user input for ok button

Hi Everyone, Does anyone know how to do a popup confirm that has a textbox where the user types in a comment.  Currently I am using just a confirm pop up.  What I really want to do is make is so the user cannot click on the ok button until there is something typed into the textbox but they can hit the cancel button at any time without providing a comment.  Any suggestions? Thanks! -Nici 

Using a sharepoint list to populate a form then capture user input


Hi.  New to this forum but looks like a great resource.  I am using MOSS2007, Infopath 2007 and Nintex workflow 2007.

I have a form that will act as a report for each of the operational sites in my company.  Each site receives freight movements on a daily basis and these are on a schedule; I am trying to record the variances to that schedule.  What I have attempted to do is the following:

  • Create a sharepoint list that contains each of the scheduled arrivals per site.
  • Connect to this list in Infopath as a secodary data source.
  • Drop this in to the form as a repeating table.
  • Filter the list of arrivals by using the conditional formatting control on the section, bound to a drop-list where the user specifies the facility/site.

What I am trying to do is present these arrivals and have the user enter an "actual" arrival time next to each, then store the results on submit.  I therefore need to know two things, 1) how to capture an "actual" value for each row in the repeating table (at the moment this is pulled in as an empty field from the list) and 2) how to store the data on submit so it is there when the form is re-opened.

I hope this makes sense, happy to give you any further information that may be required.

Thanks, Matt

Sequential workflow with user input in SPD 2007


I'm just getting in to workflows, so I assume this will result in a simple "do this" or "use VS" answer... anyways..

I am looking to create a sequential workflow in SPD 2007 for MOSS 2007 that will basically be a 5+ step approval workflow.  It will start either on-demand or when a new item is created in a list.  The first part will prompt a user to enter one or more reviewers, then the workflow will route the document through the specific reviewers and several static reviewers.  Each person will accept or deny the document, and write comments as necessary.  The only part I am having trouble with is prompting the user for reviewers, and then properly routing the document to those reviewers.  I have tried to collect the data via an initiation parameter, and I have tried to collect it as an action without much luck.  If possible, what’s the best way to do this without resorting to using VS?




How can you check the user is owned of the web site that is input in textbox?


Hi Experts.

In the most web sites when you want to register in any web sites, you must provide your information such as First name, last name, email and etc. Then the web site create a confirm link and send it to your mail. If you input your mail correctly, you can check it in your inbox of your mail and click on it to your registration is completed.

In this scenario, the users should input their mails correctly because the web sites will send the confirm link to it. In other words the mail that the users input must be owned of user else if they can't click on the confirm link.

Suppose you want the users input their web sites instead of their emails address in your web site, Now How can you check the user is owned of the web site that is input in the textbox?

I hope you understand my question else if tell me to describe it more.

With Regards. Mojtaba

Workflow User Input



I need users to fill 2 text fields before launching my workflow.

How can i make such an input form appear?


Validating User Input Using ValidationRule

In my post Input Validation using MVVM Pattern I have show you how to validate user input using the IDataErrorInfo interface in the MVVM pattern.Now in this post I will show you how to validate user input using the ValidationRule class.The ValidationRule has one abstract method which is used to write the logic for the validation of the input.I have used same example as I have used in the Input Validation using MVVM Pattern but instead of using the IDataErrorInfo interface I have used the ValidationRule class and its abstract method.

Using Sharepoint to accept User Workbook Input


I'm looking for guidance here. I believe it makes sense for me to set up a sharepoint site to accept users' workbooks to be used as input to my (currently Access) database. I have a set of users who periodically submit a workbook to my team that contains updates to third party pricing in my application. I want to standardize the process and automate it. Basically, my app opens the workbook, validates its format and content, then proceeds to post the updates to a (currently Access 2007) table using a fairly complex program (lots of data validation, business rules, etc.), puts notes about each row's status (system updated successfully, duplicate entry, invalid numbers, etc.) directly back into the workbook. The user saves the workbook with a slightly revised name, then sends it back to the submitter.

It seem to me I should be able to create a Sharepoint-centric way to do this. A user adds a new workbook to a SP library. SP sees the new entry, somehow processes it, then posts the revised workbook back to the site and notifies all the appropriate parties about the results of the run.

What's the strategy? Can I avoid user intervention? Do I need to rewrite the programs in C# or VB.NET and trigger them from some Sharepoint process? Help me with some ideas where to go. Here's my thought (though I am not sure how to implement....)

  1. User posts a wor

Return of sequential number on user input



I'm new to this forum and just as new to asp :/

I have been tasked with what on the surface seems a simply problem. I need to provide users with a method of entering an order number and in return they are given the next sequential number (seeded from a resetable number). As each order number is entered and sequential number is returned and a list of all entries/outputs is maintained.

user 1 enters a number, returns 1

user 2 enters another number, returns 2

user 3 enters any number even a repeat of previous number, returns 3

A text file or similar is maintained with results




etc etc

I was going to do this with PHP but its no longer an option, I have IIS available so can be done via web form / asp / sql.

Would anyone be able to give me some pointers?

thanks very much

SSRS 2005 reports - Parameters slow to take input from user

I have SSRS 2005 reports with two parameters, StartDate and EndDate. When I run the report in the internet explorer, the report takes 30 to 40 seconds to respond to the user control. I mean the calendar picker appears only if I click after 30-40 seconds from the time the report loaded. I'd appreciate your thoughts to resolve this issue.


Making a SharePoint list as readonly upon a user input.



I have a requirement here for which I am using a custom list. I have status field in the list and the business wants the list to be read only once the status has been changed to 'Closed'. Is that possible at all if yes how can I make all other list items as non editable once the status is closed? Please help me in doing this.

Thanks in advance.

PS: Moderator, if you think this question should belong to some other thread please move it to the correct one. Thanks.

save user's input in user control



 I have a user control (ascx file) that contains an interface for users to change the data retrieved from the db. So, I am displaying data and most of this data can be edited by the user. When the user enters text into a textbox, and clicks "Save Changes", the value they typed in is lost and not persisted to the database. I realize now this is because the SaveChanges button does a postback, and the user control gets reloaded with its original values before the code within my SaveChanges button gets executed.  I'm not sure if there are properties I need to set to save the input data, or if I need to write my own code to do it. What is the generally accepted method to do this?  (Also, all of the controls in the ascx file are wrapped in an Update Panel.)


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend