Solved

casting to FormViewUpdatedEventArgs

Posted on 2006-07-17
7
300 Views
Last Modified: 2012-08-14
How do I make a casting to  EventArgs e to be FormViewUpdatedEventArgs tempe ?
Is it possible? I need to know if a value had been changed and I have to check it not in the ItemUpdated event.

protected void btnGORecruit_Click(object sender, EventArgs e)
{
                FormViewUpdatedEventArgs tempe = (FormViewUpdatedEventArgs)e;
}
This command is wrong. HOw do I do something like this?
Thankyou
ANat
0
Comment
Question by:ANAT2403
  • 3
  • 2
  • 2
7 Comments
 
LVL 3

Expert Comment

by:harshits
ID: 17120437
Hi ANAT2403,

It is not possible to do such a casting. Can you clarify as to what you are trying to achieve by doing such a type cast? May be we can work around some other way to do that.

Harshit Sheth
0
 

Author Comment

by:ANAT2403
ID: 17120488
I need to know if a value in a dropdownlist had been changed before I update it.
If it was changed I have to update another field .  I am doing the update manually not
through the ItemUpdated event so I wanted to check if a change had been dont to the value?
Thankyuou
Anat
0
 
LVL 3

Expert Comment

by:harshits
ID: 17120610
Here something you might be able to do.

In the ItemUpdated of the FormView, you can check if any change has occurred in the dropdownlist, and then save this value in some kind of a variable may be even a Session.

After that you can do whatever update you need to do in the btnGORecruit_Click event depending on the value of the Session variable.

Harshit Sheth
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:ANAT2403
ID: 17120697
But I tried to explain that this is the whole issue!
I don't go through ItemUpdated of the formview.
I have a filed that I have to update separately and I want to know if there was or there wasn't a change
with the originol value of this field.
Thankyou
Anat
0
 
LVL 7

Expert Comment

by:whityum
ID: 17121491
why not do something like:
if(((DropDownList)FormView1.FindControl("DropDownList1")).SelectedValue != OriginalValueVariable){
//do stuff
}
0
 

Author Comment

by:ANAT2403
ID: 17121653
How will I get OriginalValueVariable?
0
 
LVL 7

Accepted Solution

by:
whityum earned 500 total points
ID: 17122990
you would have to set it when you load the page or check against the database value

how are you loading this formview?  it should be databound to something, check it against the data.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question