TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cassie Mod
NA
488
70.1k
change function so it will only get a part of the users
Mar 6 2017 9:19 AM
HI ,
Ive got the following webapp. using asp.net /c# .
Now when we go to the userpage. The page_load will be loaded.
IN the paige load there is a function to check if it is a postback. If it isn't a postback a function is called to get the users and show them in a repeater. However. The first time it loads it get all the users. the second time it doesn;t get the users ( because, it is a postback). Olso every page shows 10 users ( for now) we can change that by editing the pageSize.
How can i change te code, so it will only get the users it need ( not all of them). here is the code. please give me some advice or tips how to change the code.
protected
void
Page_Load(
object
sender, EventArgs e)
{
try
{
if
(PortalApplication ==
null
)
return
;
if
(!IsPostBack)
FillRptUsers();
}
catch
(Exception ex)
{
PortalApplication.HandleException(ex);
ShowFailureText();
}
}
public
void
FillRptUsers()
{
var serviceProviderId = PortalApplication.User.serviceProviderId;
var groupId = PortalApplication.User.groupId;
var users = PortalApplication.GetGroupUsers(serviceProviderId, groupId, UserFilter.Text, (CurrentPage - 1) * PageSize, PageSize);
}
Reply
Answers (
4
)
i got the some error
How to do Pie Chart