Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

casting to FormViewUpdatedEventArgs

Posted on 2006-07-17
7
Medium Priority
?
304 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 1000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

722 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