Web Development Company

We offer custom software and Web development services under our proven offshore model

Archive for 'asp.net web development'

Asp.net Elmah Error Logging Module

Posted in: Thursday, May 19th, 2011 | Asp.Net, asp.net developers, asp.net web development | admin

Elmah error logging modules and handlers for ASP.NET is a great error logging module for asp.net application . You can easily set up Elmah to send emails by changing the elmah configuration section in your web.config.

You can find a sample of all the different elmah web.config settings here.  The email configuration settings are the following:

<errorMail
  from="elmah@nooglesoft.com"
  to="admin@nooglesoft.com"
  subject="..."
  async="true|false"
  smtpPort="25"
  smtpServer="smtp.nooglesoft.com"
  userName="johndoe"
  password="secret"
  noYsod="true|false" />

Customize the subject line

You can do that by specifying the String.Format parameters in the configuration section subject attribute like this:

<errorMail
  from="elmah@nooglesoft.com"
  to="admin@nooglesoft.com"
  subject="Cart Application (STAGING): {0}"
  />
Asp.Net 4 – A potentially dangerous Request.Form value was detected from the client

Posted in: Monday, May 9th, 2011 | Asp.Net, asp.net programming, asp.net web development | admin

Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your asp.net application, such as a cross-site scripting attack. You can disable ( Asp.net 2.0 ) request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case. In ASP.Net 4 Please use below configuration

In the web.config file, within the <system.web> tags, insert the httpRuntime element with the attribute requestValidationMode=”2.0″.

Example:

<configuration>
<system.web>
<httpRuntime requestValidationMode=”2.0″ />
</system.web>
</configuration>

Web.config 301 Redirect – asp.net

Posted in: Tuesday, May 3rd, 2011 | Asp.Net, asp.net web development, web application development, web designing | admin

The Asp.Net 301 permanent redirect is the most search engine-friendly method of redirection to the new URL or page and is the current standard for SEO purposes.

Step 1

Download and enable the URL Rewrite module for IIS 7. Then the following code is used in the ASP.NET web.config file:

Step 2

<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Redirect to WWW" stopProcessing="true">
          <match url=".*" />
          <conditions>
            <add input="{HTTP_HOST}" pattern="^my-domain-name.com$" />
          </conditions>
          <action type="Redirect" url="http://www.my-domain-name.com/{R:0}"
               redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>
How to implement skipjack payment gateway , Asp.Net ,C#

Posted in: Wednesday, July 14th, 2010 | .net development, .Net Technology, .net web development, .net website development, Asp.Net, asp.net developers, asp.net development, asp.net framework, asp.net programming, asp.net web development, asp.net web development india, asp.net website development, b2b business to business, hire asp.net developer, hiring asp.net developers, hiring asp.net professionals, hiring asp.net programmers, payment gateway, payment gateway integration, payment gateway system, shopping cart, shopping cart development, web application development, worldpay | admin

Skipjack Come explore the many features that make Skipjack Transaction Network the leading payment gateway in North America.
Continue reading…

LINQ to SQL vs ADO.NET

Posted in: Sunday, July 11th, 2010 | .net development, .Net Technology, .net web development, .net website development, Application Development Company, asp development, asp net web application development, Asp.Net, asp.net developers, asp.net development, asp.net framework, asp.net programming, asp.net web development, asp.net web development india, asp.net website development, hire asp.net developer, hire professional designer, hiring asp.net developers, Linq, n-tier application development, web developers, web development companies, web development company | admin

ADO.NET is the underlying data access API for .NET Framework (much like JDBC in Java). It’s been around since the first release of .NET.

LINQ to SQL is a data access framework built on ADO.NET and new language features that makes SQL Server data available natively in the object oriented style of programming. LINQ (Language-Integrated Query) and thus allowing to query data using programming language’s own syntax
Continue reading…

Creating IN Queries With Linq

Posted in: Wednesday, June 23rd, 2010 | .net development, .Net Technology, .net web development, .net website development, asp development, asp net web application development, asp.net developers, asp.net development, asp.net framework, asp.net programming, asp.net web development, asp.net web development india, asp.net website development, b2b ecommerce website development, b2b web development, dotnetnuke skins development, dotnetnuke website development, enterprise application development, hire asp programmer, hire asp.net developer, hire professional designer, hiring asp programmer, hiring asp.net developers, hiring asp.net professionals, hiring asp.net programmers, Linq, Web Application Development, web development, web development companies, web development company | admin

Linq IN query will pull back a set of results from SQL that is within a given range. This range can be set manually, or can itself be a query. So if you have an eCommerce application and you want to know what products you have in a given user’s cart

SQL

SELECT * FROM Product WHERE ProductID IN (SELECT ProductID FROM mycart)

Linq

List<int> itemQuery = new List<int>() {1,2,3,4};

var myProducts = from p in db.Products
                where itemQuery.Contains(p.ProductID)
                select p;

Linq To Sql only constructs the query when the Enumerator is tripped


Google Maps Control for ASP.NET 2.0

Posted in: Friday, June 18th, 2010 | .net development, .Net Technology, .net web development, .net website development, Andoid, Application Development Company, asp development, asp net web application development, Asp.Net, asp.net developers, asp.net development, asp.net framework, asp.net programming, asp.net web development, asp.net web development india, asp.net website development, aspdotnetstorefront, aspdotnetstorefront cart development | admin

sending email in asp.net c#

Posted in: Monday, June 7th, 2010 | .net development, .Net Technology, .net website development, asp development, asp net web application development, Asp.Net, asp.net developers, asp.net development, asp.net framework, asp.net programming, asp.net web development, asp.net web development india, asp.net website development, aspdotnetstorefront, aspdotnetstorefront cart development | admin

Sending email in asp.net c# is one of the most common and reliable methods of communication for both personal and business purposes.

One of the big improvements in the configuration and maintenance of ASP.NET Web sites for version 2.0 is the ability to define common settings such as connection strings and mail server in a structured section of the web.config file

C#.net Coding Part

First add below mentioned namespace in code

using System.Net.Mail;
Continue reading…
Silverlight ComboBox binding with Dictionary.

Posted in: Monday, June 7th, 2010 | .net development, .Net Technology, .net web development, .net website development, asp development, asp net web application development, Asp.Net, asp.net developers, asp.net development, asp.net framework, asp.net programming, asp.net web development, asp.net web development india, asp.net website development | admin

<combobox x:name=”cboCountry” displaymemberpath=”Value” width=”264” canvas.left=”129” canvas.top=”172” SelectionChanged=”cboCountry_SelectionChanged/>

private void Page_Loaded(object sender, RoutedEventArgs e) {

Dictionary dict = new Dictionary();

dict.Add(1, “India”);

dict.Add(2, “USA”);

dict.Add(3, “FINLAND”);

cboCountry.ItemsSource = myDic;

}

private void cboCountry_SelectionChanged(object sender, SelectionChangedEventArgs e) {

KeyValuePair curItem = (KeyValuePair) cboCountry.SelectedItem;

MessageBox.Show(curItem.Key.ToString());

}