Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

casting to FormViewUpdatedEventArgs

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
ANAT2403
Asked:
ANAT2403
  • 3
  • 2
  • 2
1 Solution
 
harshitsCommented:
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
 
ANAT2403Author Commented:
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
 
harshitsCommented:
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
ANAT2403Author Commented:
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
 
whityumCommented:
why not do something like:
if(((DropDownList)FormView1.FindControl("DropDownList1")).SelectedValue != OriginalValueVariable){
//do stuff
}
0
 
ANAT2403Author Commented:
How will I get OriginalValueVariable?
0
 
whityumCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now