Copy the HTML code below and paste it into your HTML
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="550" HEIGHT="400" id="myMovieName">
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
1. Change the HEIGHT and WIDTH parameters to match the height and width of the movie dimensions or use percentage values, if desired.
2. Change "moviename.swf" where it appears in the OBJECT and EMBED tags to the name of movie to be played.
Wednesday, March 16, 2005
Sending mail
You can use the System.Web.Mail.MailMessage and the System.Web.Mail.SmtpMail class to send e-mail in your ASPX pages. Below is a simple example of using this class to send mail
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.Mail" %>
Mail Test
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.Mail" %>
TIP#1 : ASP.NET
Generally when using Forms authentication in ASP.NET you are able to secure your .aspx pages but you have not secured Images or documents like Ms-Word, Excel etc. A quick tip to secure these items is that you can configure that these extensions should be served by asp.net and not IIS.
1. In your IIS , Right click on the Virtual Directory and select Properties.
2. On Configuration Ta, a dialog box appears with the list of file extensions.
3. Click Add and Enter the extension type in the textbox such as .doc .ppt etc.
4. Point your path to aspnet_isapi.dll found under %windir%\Microsoft.NET\Framework\v1.1.4322 5. In "Limit to" radio button and put the same properties as like for aspx files i.e. GET, POST etc.
Its Done!
Enjoy!!
1. In your IIS , Right click on the Virtual Directory and select Properties.
2. On Configuration Ta, a dialog box appears with the list of file extensions.
3. Click Add and Enter the extension type in the textbox such as .doc .ppt etc.
4. Point your path to aspnet_isapi.dll found under %windir%\Microsoft.NET\Framework\v1.1.4322 5. In "Limit to" radio button and put the same properties as like for aspx files i.e. GET, POST etc.
Its Done!
Enjoy!!
Pagination in ASP.Net DataGrid
Quick steps to work out pagination in your datagrid.. Go to your data grid
properties... Set AllowPaging property to true... Set the PageSize to your
desired page size... Now go to events section in the properties... You have
to override PageIndexChanged Event... In the event handler... Write code
similar to the one below:
private void dgdImages_PageIndexChanged(object source,
System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
//Change the current page index to the new one
dgdImages.CurrentPageIndex = e.NewPageIndex;
//Update your data if required
dgdImages.DataSource = CreateDataSource();
//bind the data again
dgdImages.DataBind();
}
That's it... Your datagrid does not need to make your page long scrollable
now... Do note though that if you change the data in the background and the
new data does not contain as many pages as your current page index now you
might land up getting exceptions... So make sure that you do the necessary
work there...
Mitesh Mehta
properties... Set AllowPaging property to true... Set the PageSize to your
desired page size... Now go to events section in the properties... You have
to override PageIndexChanged Event... In the event handler... Write code
similar to the one below:
private void dgdImages_PageIndexChanged(object source,
System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
//Change the current page index to the new one
dgdImages.CurrentPageIndex = e.NewPageIndex;
//Update your data if required
dgdImages.DataSource = CreateDataSource();
//bind the data again
dgdImages.DataBind();
}
That's it... Your datagrid does not need to make your page long scrollable
now... Do note though that if you change the data in the background and the
new data does not contain as many pages as your current page index now you
might land up getting exceptions... So make sure that you do the necessary
work there...
Mitesh Mehta
Dr. Dotnetsky's Cool .NET Tips & Tricks
Nice tips & tricks on .Net...a regular must read which doesn't
restrict only on langauge but speaks about even on DB's, Operating
systems, SDK's, various Service packs etc etc
More enjoyment here...
http://www.eggheadcafe.com/articles/20040821.asp
restrict only on langauge but speaks about even on DB's, Operating
systems, SDK's, various Service packs etc etc
More enjoyment here...
http://www.eggheadcafe.com/articles/20040821.asp
ASP.NET Vulnerability
This is today's HOT NEWS for ASP.NET developers!
There is a report on ASP.NET vulnerability and Microsoft is currently investigating on this issue. The issue is that ASP.NET is failing to perform proper canonicalization of some URLs.
This issue affects Web content owners who are running any version of ASP.NET on Microsoft Windows 2000, Windows 2000 Server, Windows XP Professional, and Windows Server 2003.
To know more about this issue and recommended guidance on best practices visit
http://www.microsoft.com/security/incident/aspnet.mspx
There is a report on ASP.NET vulnerability and Microsoft is currently investigating on this issue. The issue is that ASP.NET is failing to perform proper canonicalization of some URLs.
This issue affects Web content owners who are running any version of ASP.NET on Microsoft Windows 2000, Windows 2000 Server, Windows XP Professional, and Windows Server 2003.
To know more about this issue and recommended guidance on best practices visit
http://www.microsoft.com/security/incident/aspnet.mspx
Subscribe to:
Posts (Atom)