return Redirect("http://www.google.com");
Wednesday, November 30, 2011
Tuesday, November 29, 2011
My another Orchard module, TagMenuWidget
https://gallery.orchardproject.net/List/Modules/Orchard.Module.TagMenuWidget
You could put this widget into navigation layer as dynamic menu bar.
Steps: 1. Add this widget into navigation part, and setup tags
2. Put these tag into pages
3. Menu bar would be avaible by the title of pages.
You could put this widget into navigation layer as dynamic menu bar.
Steps: 1. Add this widget into navigation part, and setup tags
2. Put these tag into pages
3. Menu bar would be avaible by the title of pages.
Monday, November 28, 2011
How to display System.Data.DataTable data in ASP.NET MVC
public ActionResult TasksByProjectReport()
{
System.Data.DataTable data = _reportService.GetReportData();
return View(data);
}
@model System.Data.DataTable
@using System.Data; <h2>Report</h2>
<table>
<thead>
<tr>
@foreach (DataColumn col in Model.Columns)
{
<th>@col.ColumnName</th> }
</tr>
</thead>
<tbody>
@foreach (DataRow row in Model.Rows)
{
<tr>
@foreach (DataColumn col in Model.Columns)
{
<td>@row[col.ColumnName]</td> }
</tr> }
</tbody>
</table>
http://weblogs.asp.net/gunnarpeipman/archive/2011/11/19/asp-net-mvc-simple-view-to-display-contents-of-datatable.aspx
{
System.Data.DataTable data = _reportService.GetReportData();
return View(data);
}
@model System.Data.DataTable
@using System.Data; <h2>Report</h2>
<table>
<thead>
<tr>
@foreach (DataColumn col in Model.Columns)
{
<th>@col.ColumnName</th> }
</tr>
</thead>
<tbody>
@foreach (DataRow row in Model.Rows)
{
<tr>
@foreach (DataColumn col in Model.Columns)
{
<td>@row[col.ColumnName]</td> }
</tr> }
</tbody>
</table>
http://weblogs.asp.net/gunnarpeipman/archive/2011/11/19/asp-net-mvc-simple-view-to-display-contents-of-datatable.aspx
How to make SSO, Single Sign-On in ASP.NET for two sub domains?
1. Put same machine keys setting in two web.config file:
http://rayaspnet.blogspot.com/2011/11/how-to-generate-machine-key-for-aspnet.html
2. Modify following parts in two web.config files:
Name, domain, path and
http://rayaspnet.blogspot.com/2011/11/how-to-generate-machine-key-for-aspnet.html
2. Modify following parts in two web.config files:
Name, domain, path and
enableCrossAppRedirects
<authentication mode="Forms">
<forms name=".ASPNET" path="/" domain="abc.com" enableCrossAppRedirects="true" />
</authentication>
Friday, November 25, 2011
Wednesday, November 23, 2011
Tuesday, November 22, 2011
Monday, November 21, 2011
Friday, November 18, 2011
Thursday, November 17, 2011
Wednesday, November 16, 2011
How to integrate ASP.NET membership into YetAnotherForum.net?
http://ewitch.net/docs/YAFMembershipIntegration.pdf
P.S.:
1. When create Membership database, please install all:
aspnet_regsql.exe -E -S sqlserverinstancename -A all
2. YAF and membership database have to be in same database
P.S.:
1. When create Membership database, please install all:
aspnet_regsql.exe -E -S sqlserverinstancename -A all
2. YAF and membership database have to be in same database
Tuesday, November 15, 2011
Monday, November 14, 2011
How to get current Windows Logon user if authentication mode in web.config is set to Forms in MVC?
Request.ServerVariables["LOGON_USER"]
References:
IIS 7.0 Two-Level Authentication with Forms Authentication and Windows Authentication
http://mvolo.com/blogs/serverside/archive/2008/02/11/IIS-7.0-Two_2D00_Level-Authentication-with-Forms-Authentication-and-Windows-Authentication.aspx
Mixing Forms and Windows Security in ASP.NET
http://msdn.microsoft.com/en-us/library/ms972958.aspx
Friday, November 11, 2011
How to use jQuery in Orchard CMS modules?
On the top of cshtml file put following code:
@{
Script.Require("jQuery");
}
@using(Script.Foot()) {
<script type ="text/javascript">
//<![CDATA[
$(document).ready(function () {
alert('page loaded');
});
//]]>
</script>
}
How to get selected value of dropdown by Javascript
var selectedvalue = document.getElementById('yourSelectBoxId').value
How to write a Widget for Orchard CMS? Coding, Packaging and installing
1. Coding:
http://orchardproject.net/docs/Writing-a-content-part.ashx
http://orchardproject.net/docs/Writing-a-widget.ashx
2. Packaging:
http://www.orchardproject.net/docs/Packaging-and-sharing-a-module.ashx
3. Installing:
http://www.orchardproject.net/docs/Installing-and-upgrading-modules.ashx
Thursday, November 10, 2011
How to change a project type to MVC 3?
Open csproj file from text editor, such as notepad
change ProjectTypeGuids to following setting
<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
Sunday, November 6, 2011
Friday, November 4, 2011
Thursday, November 3, 2011
Wednesday, November 2, 2011
Tuesday, November 1, 2011
Subscribe to:
Posts (Atom)