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
Tim Hansen
NA
3
2.5k
Use function to load data for multiple forms
Apr 14 2011 4:18 PM
I'm working on an app that has a function that loads form information to be displayed. but it loads it , directly?
<PreviewFormCtrl:REVIEWFORM id="ReviewForm" runat="server"></PreviewFormCtrl:REVIEWFORM>
(in code behind)
private void LoadFormPreview()
{
this.ReviewForm.lblCo_Name = this.txtCo_Name.Text.ToString();
this.ReviewForm.lblCo_Address1 = this.txtCo_Address1.Text.ToString();
...
can i make this more generic so i can provide the form as a parameter? if so, what would the datatype be? i attempted using a string but that just produced an error..
private void LoadFormPreview(string rvwForm)
{
this.rvwForm.lblCo_Name = ...
Any help would be very much appreciated.
Thanks
Reply
Answers (
2
)
ASP.Net MVC, MVP
assembly