Facebook Twitter Gplus RSS
magnify
magnify
formats

News management and blog software

in ASP.NET, C#, MVC

Gnews Publisher .NET

ASP.NET content manager Gnews Publisher.NET is a cost-effective solution to manage news and articles online. Gnews Publisher allow you to publish press releases, news, company announcements, articles and knowledge-base content divided to categories.

This powerful script is one of the ASP.NET News Publishing software in catalogs. News publishing is using ASP.Net and come with great advantages. If you try online demo you’ll How-to Enable scheduled publishing.

Order and download software from Gazatem Technologies

 

 
Tags:
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments 
formats

Create a JavascriptResult for ASP.NET MVC

in ASP.NET, MVC

One pillar of ASP.NET MVC is the extensibility. It means you can add whatever you want wherever you want (or something like that).

Like all frameworks, ASP.NET MVC does not cover all features requested by developers, but offers the opportunity to create your own logic. That means extensibility.

In my case, the goal was to render a partial view into a JavaScript file.

Before to see how you can do that, it’s important to understand what does really mean “render a partial view into a Javascript file”.

In this example I want to create a simple HTML including the base info for a user profile (Firstname, Lastname and website).

Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments 
formats

Implementing custom password policy using ASP.NET Identity

in ASP.NET

To provide a more secure user experience for the application, you might want to customize the password complexity policy. This might include minimum password length, mandatory special characters in the password, disallowing recently used passwords, etc. More information on password policy can be found here. By default ASP.NET Identity enforces a minimum password length of 6 characters. This article provides a simple walkthrough that shows how to add a few more password policies to an application.

Read complete article at msdn.com

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments 
formats

Building Real-World Cloud Apps with Windows Azure

Building Real-World Cloud Apps with Windows AzureMost of the screen shots and code examples shown in this e-book are based on the Fix It app originally developed by Scott Guthrie to demonstrate recommended cloud app development patterns and practices.

Developers who are curious about developing for the cloud, considering a move to the cloud, or are new to cloud development will find here a concise overview of the most important concepts and practices they need to know. The concepts are illustrated with concrete examples, and each chapter links to other resources for more in-depth information. The examples and the links to additional resources are for Microsoft frameworks and services, but the principles illustrated apply to other web development frameworks and cloud environments as well.

Developers who are already developing for the cloud may find ideas here that will help make them more successful. Each chapter in the series can be read independently, so you can pick and choose topics that you’re interested in.

Anyone who watched Scott Guthrie’s Building Real World Cloud Apps with Windows Azure presentation and wants more details and updated information will find that here. More at ASP.NET

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments 
formats

Data Grid Paging

in ASP.NET, C#

This sample code show us datagraid paging. Source code is written in C#.

 

Web Form:


 < % @ Page Language = "C #" AutoEventWireup = "true" CodeFile = "Default.aspx.cs" Inherits = "_Default"%>

 

< ! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns = "http://www.w3.org/1999/xhtml">

<head runat = "server">

    <title> paged GridView paging 



<body>

    <form id = "form1" runat = "server">

    <asp: GridView ID = "GridView1" runat = "server" AutoGenerateColumns = "False"

        AllowPaging = "True" DataSourceID = "SqlDataSource1" DataKeyNames = "o_id" Width = "300px">

        <columns>

            <asp: BoundField DataField = "o_id" HeaderText = "ID" SortExpression = "o_id

                ReadOnly = "True"></asp:>

            <asp: BoundField DataField = "o_name" HeaderText = "counties"

                SortExpression = "o_name"></asp:>

            <asp: BoundField DataField = "c_id" HeaderText = "City ID" SortExpression = "c_id"></asp:>

        

    

    <asp: SqlDataSource ID = "SqlDataSource1" runat = "server" ConnectionString = "<% $ ConnectionStrings: connstr%>"

        SelectCommand = "SELECT * FROM [County]">

    

    



 
</asp:></columns></asp:></form></body></title></head></html>

 

Here is the source behind:

 using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Configuration;

using System.Data;

public partial class _Default: System.Web.UI. Page

{

    protected void Page_Load (object sender, EventArgs e)

    {

        if (! IsPostBack)

        {

            BindGrid;

        }

    }

    protected void GridView1_PageIndexChanging (object sender, GridViewPageEventArgs e)

    {

        GridView1.PageIndex = e.NewPageIndex;

        BindGrid;

    }

    private void BindGrid ()

    {

        GridView1.DataSource = SqlDataSource1.Select (DataSourceSelectArguments. Empty) as DataView;

        GridView1.DataBind ();

    }

}
 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments 
formats

Securing a Web API with Windows Azure AD and Katana

During the Active Directory //BUILD/ 2013 talk I briefly touched on how the  Web API in my sample scenarios were secured using the new OWIN middleware offered by the ASP.NET’s Katana project, as opposed to the custom code we describe in our current native app+Web API walkthrough. I had a lot of ground to cover, hence I did not have the chance of going in any depth; however the topic is super important, hence here I’ll provide a more thorough coverage of how you can use Katana to secure access to Web API via Windows Azure AD.

Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments 
formats

Deploy an ASP.NET MVC Mobile Web Application on Windows Azure Web Sites

in ASP.NET

This tutorial will teach you the basics of how to deploy a web application to to a Windows Azure web site. For the purposes of this tutorial we will work with mobile features in an ASP.NET MVC 4 web application. To perform the steps in this tutorial, you can use Microsoft Visual Studio 2012. You can also use Visual Studio Express 2012 or Visual Web Developer 2010 Express Service Pack 1 (“Visual Web Developer or VWD”), which are a free versions of Microsoft Visual Studio.

Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments 
formats

Connecting to MySQL

Using mySQL 3.1 driver you may use this code to connect to mysql

“Provider=MSDASQL; DRIVER={MySQL ODBC 3.51Driver}; SERVER= localhost; DATABASE=Your_MySQL_Database; UID= Your_Username; PASSWORD=Your_Password; OPTION=3″

If you wish to use MySQL OLE DB, you need to use this code:

“Provider=MySQLProv;Data Source=Your_MySQL_Database;User Id=Your_Username; Password=Your_Password;”

 

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments 
formats

Real World OAuth using ASP.NET MVC

in ASP.NET, MVC

If you haven’t heard of OAuth or OpenID you have most certainly used it in day to day life. Have you provided your google username/password and logged in to StackOverflow or used your WordPress.com account to post comments on someone’s blog or used third party Twitter clients whom you have given permission to use your Twitter account or used Facebook to post comments on some tech blog site? If answer to any of the above is a Yes, you have seen OAuth or OpenID in action.

Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments 
formats

How to change Session TimeOut?

in ASP.NET

You need to update sessionState node located in web.config. Default value is 90 but probably it’s not enaugh and need to update it to 150. How ever while updating web.config you should care about application pool and IIS settings, since default idle timeout is 20 min. More about application pool idle visit MSDN

 

 

 

 

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Comments Off  comments