Skip to content

Instantly share code, notes, and snippets.

@brianium
Created March 29, 2012 17:46
Show Gist options
  • Save brianium/2240668 to your computer and use it in GitHub Desktop.
Save brianium/2240668 to your computer and use it in GitHub Desktop.
code behind sample using web forms mvp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebFormsMvp;
using WebFormsMvp.Web;
using BissellMVPTest.BLL.Views.Models;
using BissellMVPTest.BLL.Views;
using BissellMVPTest.BLL.Presenters;
using BissellMVPTest.BLL.Views.EventArguments;
namespace BissellMVPTest.Web
{
[PresenterBinding(typeof(BlogPostPresenter))]
public partial class PageView : MvpPage<BlogPostModel>, IBlogPostView
{
public event BlogPostHandler Saved;
public bool isVisible { get; set; }
public void btnCreatePost_OnClick(object sender, EventArgs e)
{
var args = new BlogPostArgs()
{
PostTitle = postTitle.Text,
PostContent = postContent.Text
};
if (Saved != null)
Saved(this, args);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment