Skip to content

Instantly share code, notes, and snippets.

View shuvoranger's full-sized avatar
🏠
Working from home

Shuvo Sarker shuvoranger

🏠
Working from home
  • selise rockin' software bangladesh
  • Dhanmondi,Dhaka.
View GitHub Profile
@shuvoranger
shuvoranger / Download File from Specific Location in Asp.net MVC
Created August 23, 2015 06:32
Download File from Specific Location in Asp.net MVC
public async Task<ActionResult> GeneratePayment()
{
string fileName = "Book.pdf";
try
{
if (!string.IsNullOrEmpty(fileName))
{
@shuvoranger
shuvoranger / CheckBoxList_in_MVC_with_Razor
Last active August 29, 2015 14:21
CheckBoxList in MVC with Razor
//ViewModel
public class RegisterViewModel
{
public string UserType { get; set; }
public SelectList Groups { get; set; }
public IEnumerable<string> SelectedGroups { get; set; }
}
@shuvoranger
shuvoranger / DropDownList in MVC with Razor
Last active August 29, 2015 14:21
DropDownList in MVC 4 with Razor
//ViewModel
public class RegisterViewModel
{
public RegisterViewModel()
{
ActionsList = new List<SelectListItem>();
}
@shuvoranger
shuvoranger / Make MsWord file from Textbox input in C#.
Last active August 29, 2015 14:20
Make MsWord file from Textbox input in C#.
private void btnSaveWord_Click(object sender, EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
DialogResult messageResult = MessageBox.Show("Save this file into Doc?", "Doc File", MessageBoxButtons.OKCancel);
if (messageResult == DialogResult.Cancel)
{
MessageBox.Show("Operation Canceled By User", "Doc File");
@shuvoranger
shuvoranger / Make Pdf from Text box input in C#.
Last active October 1, 2020 11:23
Make Pdf from Text box input in C#.
private void btnSavePDF_Click(object sender, EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
DialogResult messageResult = MessageBox.Show("Save this file into PDF?", "PDF File", MessageBoxButtons.OKCancel);
if (messageResult == DialogResult.Cancel)
{
MessageBox.Show("Operation Canceled By User", "PDF File");
}