473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

FormView PageIndexChanging DataKeys

Hello All:

I am working with a FormView Control

<asp:FormView ID="FormView1" DataKeyNames="Id,Date" runat="server"/>

In the FormView1_PageIndexChanging(object sender, FormViewPageEventArgs e)

How do I get the DataKeys for the New Page Index Selected ?

Thanks
Stuart
Oct 18 '07 #1
1 4719
Figured it out, to get the DataKey the results need to be evaluated in the
FormView1_PageIndexChanged event and NOT FormView1_PageIndexChanging, makes
sense.

void FormView1_PageIndexChanged(object sender, EventArgs e)
{
int selectedValue = (int)FormView1.SelectedValue;
Response.Write("Selected Value" + selectedValue.ToString() +
"<br/>");

}

Thanks
Stuart

"Stuart Shay" <ss***@yahoo.comwrote in message
news:18**********************************@microsof t.com...
Hello All:

I am working with a FormView Control
<asp:FormView ID="FormView1" DataKeyNames="Id,Date" runat="server"/>

In the FormView1_PageIndexChanging(object sender, FormViewPageEventArgs e)

How do I get the DataKeys for the New Page Index Selected ?

Thanks
Stuart
Oct 18 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Marina | last post by:
Hi, There is a component that is binding the results of a search to a DataList. By clicking on an image in the datalist, the user can download that particular item. We are using the DataKeys...
1
by: Daves | last post by:
I have an aspx page to view a single blog entry along with user comments. The blogs are stored in one table in the database and the comments in another. A (2.0) FormView displays the blog entry and...
3
by: sck10 | last post by:
Hello, I am creating a form for users to enter information about a lab and the members of the lab. I have one form (FormView) that they use to enter information about that lab. The keyvalue is...
1
by: MasterChief | last post by:
I have a FormView that won't update at all. I have looked at thing such as datakeys and making sure the update command is correct but I can't find the problem. Here is my code. Could the item_id...
4
by: J055 | last post by:
Hi I have 2 update buttons in my FormView ('Apply' and 'OK'). I want both buttons to update the data source but the 'OK' button should redirect afterwards. I can see which button is clicked...
6
by: Greg | last post by:
Hello, I have a GridView bound to a custom object. I set the DataKeyNames property along with the column DataField properties at design time, and bind the GridView to my object at run-time. In...
1
by: andy | last post by:
I have several forms with formviewa on them. When a new record is inserted the users want to see the readonly version of that record. Default behaviour is to show the first record in the...
1
by: Jason Huang | last post by:
Hi, In my C# 2.0 web form project, I have GridView1 in Form1.aspx. I am wondering why I can't find the PageIndexChanging event in the Form1.aspx.cs but the GridView1 still can go to other...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.