Solved

casting to FormViewUpdatedEventArgs

Posted on 2006-07-17
7
298 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now