Karatas, FERHAT
I would love to change the world, but they won't give me the source code!
Flash Player Detection Kit
25.6.2009 10:51:57 - Filed under : Asp.net
The Flash Player Detection Kit helps developers implement robust player detection for a variety of deployment environments by providing a set of templates and techniques to successfully detect the version of Flash Player installed on a user’s computer, and, if needed, to then install the latest version of Flash Player. The kit also includes a detailed explanation and sample files for implementing the new, player-based Flash Player Express Install experience. The scripts in the Flash Player Detection Kit are also incorporated into Flash Professional 8.

Please click here to download Client-side/Javascript Detection samples.

More detail : http://www.adobe.com/products/flashplayer/download/detection_kit/

Keywords : Flash version detection, javascript
with 0 comments

The remote certificate is invalid
24.6.2009 22:54:49 - Filed under : C# | Asp.net
If I enable EnableSsl for smtpclient am getting an exception: "The remote certificate is invalid according to the validation procedure."

It means the server certificate isn't valid by regular validation rules. You can simply use this snippet to by-pass it:
public static bool AcceptAllCertificatePolicy(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{ return true; }

public static void SendMail(string body, string to, string subject, string attachFilename)
  MailMessage message = new MailMessage();
  message.Priority = MailPriority.Normal;
  message.To.Add(new MailAddress(to));
  message.Subject = subject;
  message.IsBodyHtml = true;
  message.BodyEncoding = System.Text.Encoding.GetEncoding("ISO-8859-9");
  message.Body = body;

  if (attachFilename != string.Empty)
    message.Attachments.Add(new Attachment(attachFilename));

  ServicePointManager.ServerCertificateValidationCallback = AcceptAllCertificatePolicy;
  SmtpClient client = new SmtpClient();
  client.EnableSsl = true;

Keywords : Smtpclient, asp.net, system.net.mail, EnableSSL, validation.
with 0 comments

ASP.NET GridView Paging Style
23.6.2009 10:05:07 - Filed under : Asp.net | CSS
Tip 1: Change the style of the selected page or highlight the current page in the GridView Pager control
A simple way is to use CSS as shown below. The <PagerStyle> is set to a css class which modifies the style of the pager:
<head runat="server">
       <style type="text/css">   
              .cssPager span { background-color:#4f6b72; font-size:18px;}    
<asp:GridView ID="GridView1" runat="server" AllowPaging="true" AutoGenerateColumns="false" DataKeyNames="ProductID" DataSourceID="SqlDataSource1">
    <PagerStyle CssClass="cssPager" />
The output is as shown below, with the style set for the current page.

Tip 2: How to increase the spacing between the ASP.NET GridView Pager Numbers
One simple way is to use CSS again. Observe how we have set a cssClass to the PagerStyle, similar to what we saw in Tip 1, and are increasing the padding for the <td>:
<head runat="server">
       <style type="text/css">            
            .cssPager td
                  padding-left: 4px;     
                  padding-right: 4px;     
<asp:GridView ID="GridView1" runat="server" AllowPaging="true" AutoGenerateColumns="false" DataKeyNames="ProductID" DataSourceID="SqlDataSource1">
    <PagerStyle CssClass="cssPager" />
The output looks similar to the following with the increased space between the page number display.

Keywords : Some Tips and Tricks while Using ASP.NET GridView Paging
with 0 comments

Classic ASP Error Messages in IIS 7.5
22.6.2009 13:39:56 - Filed under : Asp.net
In earlier versions of IIS, error messages from classic ASP scripts were sent to a Web browser, by default. Because these error messages might reveal sensitive information to malicious users, IIS 7.0 disables this feature by default. When your classic ASP scripts encounter an error in IIS 7.0, you receive the following error message by default:

An error occurred on the server when processing the URL. Please contact the system administrator.
  If you are the system administrator please click here to find out more about this error. 
You can customize the ASP script error message, and also determine whether to return the script errors to a Web browser. Note: As a best practice for security, you should only enable sending ASP script error messages to a Web browser on a development or test computer; returning script error messages to a Web browser can unintentionally expose more information than you intended to show. Customizing Classic ASP Error Messages
The configuration settings that you use to customize these settings are in the following list:

This is an optional string attribute that specifies the error message that will be sent to the browser when specific debugging errors are not sent to the client.
This is an optional Boolean attribute that specifies whether the writing of debugging specifics to the client browser is enabled
You can configure these settings by using IIS Manager. To do so, open IIS Manager and navigate to the site or application where you want to enable or disable script messages, and then double-click the ASPfeature.

In the list of ASP features, configure the Script Error Message and Send Errors To Browser options.

Keywords : Classic ASP script error messages are no longer shown in a Web browser by default.
with 0 comments

Installing Classic ASP on Windows 7
22.6.2009 13:17:58 - Filed under : Asp.net
1. Click Start, and then click Control Panel.
2. In Control Panel, click Programs and Features, and then click Turn Windows Features on or off.
3. Expand Internet Information Services, then World Wide Web Services, then Application Development Features.
4. Select ASP, and then click OK.

Keywords : Classic ASP is not installed by default on IIS 7.0 and IIS 7.5
with 0 comments

Previous | Next
Current Page: 3