Custom Search

Saturday, May 31, 2008

AJAX Article

i got nice article about AJAX. This article discuss how AJAX can make some different on process web development. here to read this article, enjoy.....




Friday, May 30, 2008

Using RadioButtonList Control

The RadioButtonList control, like the DropDownList control, enables a user to select only one list item at a time. The RadioButttonList control displays a list of radio buttons that can be arranged either horizontally or vertically.

The RadioButtonList control includes three properties that have an effect on its layout:

  • RepeatColumns The number of columns of radio buttons to display.

  • RepeatDirection The direction that the radio buttons are repeated. Possible values are Horizontal and Vertical.

  • RepeatLayout Determines whether the radio buttons are displayed in an HTML table. Possible values are Table and Flow.

By default, the radio buttons rendered by the RadioButtonList control are rendered in an HTML table. If you set the RepeatLayout property to the value Flow, then the radio buttons are not rendered in a table. Even when the RadioButtonList renders its items in Flow layout mode, you can specify multiple columns




Code Example :

< %@ Page Language="VB" %>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
< runat="server">

Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
lblStudent.Text = rblStudent.SelectedItem.Text
End Sub
< /script>
< xmlns="http://www.w3.org/1999/xhtml">
< id="Head1" runat="server">
<>Show RadioButtonList< /title>
< /head>
< body>
< id="form1" runat="server">
< form id="form1" runat="server">
< div>

< asp:RadioButtonList
id="rblStudent"
DataSourceID="srcStudent"
DataTextField="name"
DataValueField="id"
RepeatColumns="3"
Runat="server" />
< id="btnSubmit" text="Submit" runat="server" onclick="btnSubmit_Click">

< id="lblStudent" runat="server">

< id="srcStudent" selectcommand="SELECT id, name FROM student" connectionstring="">"
Runat="server" />

< /div>
< /form>
< /body>
< /html>


Wednesday, May 28, 2008

Create simple upload file in PHP

This simple code for upload in php. this need two files, form.html and upload.php.

Form.html

< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< xmlns="http://www.w3.org/1999/xhtml">
<>
< equiv="Content-Type" content="text/html; charset=utf-8">
<>Untitled Document< /title>
< /head>
<>
< action="upload.php" method="post" enctype="multipart/form-data">
Browse File : < type="file" name="filename">
<><>
< type="submit" value="Submit">
< /form>
< /body>
< /html>

and this code for upload.php for handling upload process to server.

< ? $directory="E:/myweb/public_html/example_blog/upload/data";
if(@copy($_FILES[filename][tmp_name],$directory."/".$_FILES[filename][name])):
print "upload success";
else:
print "upload failed";
endif;
exit;
? >






Tuesday, May 27, 2008

Using Drop Down List in ASP.NET

The DropDownList control enables you to display a list of options while requiring a minimum of screen real estate. A user can select only one option at a time when using this control

Code example :
< %@ Page Language="VB" %>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
< script runat="server">

Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
lblStudent.Text = ddlStudent.SelectedItem.Text
End Sub
< /script>
< html xmlns="http://www.w3.org/1999/xhtml" >
< head id="Head1" runat="server">
< title>Show DropDownList< /title>
< /head>
< body>
< form id="form1" runat="server">
< div>

< asp:DropDownList
id="ddlStudent"
DataSourceID="srcstudent"
DataTextField=name"
DataValueField="id"
Runat="server" />

< asp:Button
id="btnSubmit"
Text="Submit"
OnClick="btnSubmit_Click"
Runat="server" />

< hr />

< asp:Label
id="lblStudent"
Runat="server" />

< asp:SqlDataSource
id="srcstudent"
SelectCommand="SELECT id,name FROM student"
ConnectionString="<%$ ConnectionStrings:student %>"
Runat="server" />

< /div>
< /form>
< /body>
< /html>

The DropDownList control renders an HTML <> tag. One problem with the HTML <> tag is that it has an infinite z index. In other words, you can't place other objects, such as an absolutely positioned <> tag, in front of a DropDownList control in a page.

Sunday, May 25, 2008

Web 2.0 Tools

Here some tools for create useful web 2.0 graphics, including Background, Button, FavIcon and many more....




Thursday, May 22, 2008

Using Outline in CSS

An outline is sort of a like a border, but there are some very important differences.

  1. outlines do not participate in the flow of the document like borders do, and thus don't trigger document reflow as they appear and disappear.
  2. outlines can be nonrectangular


Outlines are considered to be part of user interface styling because they are most often used to indicate the current focus.

Outline Property :

Values
[ <> || <> || <> ] | inherit

Initial value
not defined

Applies to
all elements


Wednesday, May 21, 2008

Templates in Data Bound Control

Almost all the DataBound controls support templates. You can use a template to format the layout and appearance of each of the data items that a DataBound control displays. Within a template, you can use a DataBinding expression to display the value of a data item.


Every DataBound control included in the ASP.NET 2.0 Framework supports templates with the sole exception of the treeView control. The Repeater, DataList, and FormView controls all require you to use templates. If you don't supply a template, then these controls display nothing. The GridView, DetailsView, and Menu controls also support templates, but they do not require a template. A template can contain HTML, DataBinding expressions, and other controls.

Example :

< %@ Page Language="VB" %>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
< html xmlns="http://www.w3.org/1999/xhtml" >
< head id="Head1" runat="server">
< title>Show Links< /title>
< /head>
< body>
< form id="form1" runat="server">
< div>

< asp:Repeater
id="Repeater1"
DataSourceId="srcStudent"
Runat="server">
< ItemTemplate>
< asp:HyperLink
id="HyperLink1"
Text='<%# Eval("name") %>'
NavigateUrl='<%# Eval("id", "Details.aspx?id={0}") %>'
runat="server" />
< br />

< /ItemTemplate>
< /asp:Repeater>


< asp:SqlDataSource
id="srcStudent"
ConnectionString="Data Source=.\SQLExpress;
AttachDbFilename=|DataDirectory|Data.mdf;
Integrated Security=True;User Instance=True"
SelectCommand="SELECT id, name FROM student"
Runat="server" />

< /div>
< /form>
< /body>
< /html>




Tuesday, May 20, 2008

Top Web 2.0 Apps

here are top Web 2.0 apps :

Reflect.com : Reflect is a hosted website solution that allows web designers and their clients to easily create and manage websites.

designmyroom.com : is easiest for design interior spaces

ajaxlookup.com : free service to check domain availability




Sunday, May 18, 2008

How to : Image Validator In PHP

This simple source to create image validator function :

function generate_image_validator(){
global $app;
// Create an image where width=155 pixels and height=35 pixels
$val_img = imagecreate(155, 35);
// Allocate 2 colors to the image
$color1 = imagecolorallocate($val_img, 46,60,31);
$color2 = imagecolorallocate($val_img, 238,239,239);
// Create a seed to generate a random number
srand((double)microtime()*1000000);
// Run the random number seed through the MD5 function
$seed_string = md5(rand(0,9999));
// Chop the random string down to 5 characters
// This is the validation code we will use
$val_string = substr($seed_string, 17, 5);
// Set the background of the image to color2
imagefill($val_img, 0, 0, $color2);
// Print the validation code on the image in color1
imagestring($val_img, 4, 75, 10, $val_string, $color1);
// Write the image file to the current directory
imagejpeg($val_img, "img.jpg");
imagedestroy($val_img);
$app[val_string]=$val_string;
return;
}





Saturday, May 17, 2008

Using FindControl and PreviousPage with Master Pages

In theory, PreviousPage lets you access data on the page the user just requested. In practice it doesn't work if you're also using Master Pages unless you understand ASP.NET naming containers.

PreviousPage promises a lot: You transfer to a target page using either Server.Transfer on the server or cross-page posting from the browser.

Once you arrive at the target page, you can use its PreviousPage property to reach back to a control on the previous page and retrieve its data.

For more complete article click here

Using Database Commands in ASP.NET

The SqlDataSource control can be used to represent four different types of SQL commands that use for executing inline SQL statements. The control supports the following four properties:
selectCommand, insertCommand, updateCommand, and deleteCommand
Example

asp:SqlDataSource

id="srcStudent"

SelectCommand="SELECT * FROM student"

ConnectionString="<%$ ConnectionStrings:Student %>"

Runat="server"






Friday, May 16, 2008

Overview of XML

As the popularity of XML grew, web developers wanted to use the technology on both the server and client side, but only the former initially offered XML functionality. Starting with Internet Explorer 5.0 and Mozilla 1.0 (predecessor to Firefox), Microsoft and Mozilla implemented JavaScript support for XML in their browsers.

The name of the game in XML is data storage, and that’s what XML excels at.XML got to be so popular because it’s a text-based way of storing your data, and the Internet is based on text transfer. So XML became the Internet’s way of slinging data around, as you already know now that you’re an Ajax developer.
To start create an XML document, you need an XML declaration depends on which version of XML you’re using. Currently, only two versions are possible: version 1.0, the most common, and version 1.1.
every an XML document must begin with XML declaration and Each XML document starts with a start tag and ends with an end tag.





Monday, May 12, 2008

Using Cursor in CSS

An important part of the user interface is the cursor (referred to in the CSS specification as the "pointing device"), which is controlled by a device such as a mouse, trackpad, graphic tablet, or even an optical-reading system. The cursor is useful for providing interaction feedback in most web browsers.

CSS2 lets you change the cursor icon, which means that it's much easier to create web-based applications that function in a manner similar to desktop applications in the operating system.

Cursor property
Values : [[,]* [ auto | default | pointer | crosshair | move | e-resize | ne- resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help | progress ]] | inherit
Initial Value : auto

Example:
a{ cursor:pointer}


Saturday, May 10, 2008

Another Web 2.0 Resource

Today i was surfer on internet. i wont search web 2.0 tutorial and i found this website smashingmagazine.com. There are many more turorial and resource about web 2.0 and that technology that support web 2.0. Enjoy !!!




Wednesday, May 7, 2008

Storing Connection Strings in the Web Configuration File

There are three reason for why storing connection strings is a bad idea.first, it is not good from perspective of security.in this case, no one should ever be able to view the source code of your ASP.NET pages, but in practice,hackers have discovered security flaws in the ASP.NET framework.so you should store your connection strings in a separate file.

second, adding a connection string to every page makes it difficult to manage a website,in other hand if you need change connection string, you only modifying the single file.

last, storing a connection string in a page can, potentially, hurt the performance of your application.

for these reason, you should always put your connection string in the web configuration file.

eXAMPLE

Web.Config

< ?xml version="1.0"?>
<>
<>
< name="student" connectionstring="Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|MyData.mdf;Integrated Security=True; User Instance=True">
< /connectionStrings>
< /configuration>

displaystudent.aspx

< %@ Page Language="VB" %>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
< xmlns="http://www.w3.org/1999/xhtml">
< id="Head1" runat="server">
<>Show Movies
< /head>
< body>
< id="form1" runat="server">
< div>

< id="grdStudent" datasourceid="srcStudent" runat="server">

< id="srcStudent" selectcommand="SELECT * FROM student" connectionstring="<%$ ConnectionStrings:student %>">"
Runat="server" />

< /div>
< /form>
< /body>
< /html>

The expression <%$ ConnectionStrings:student %> is used to represent the connection string. This expression is not case sensitive.

Monday, May 5, 2008

SqlDataSource Overview

The SqlDataSource control enables you to quickly and easily represent a SQL database in a web page. In many cases, you can take advantage of the SqlDataSource control to write a database-driven web page without writing a single line of code.You use the SqlDataSource control to represent a connection and set of commands that can be executed against a SQL database. You can use the SqlDataSource control when working with Microsoft SQL Server, Microsoft SQL Server Express, Microsoft Access, Oracle, DB2, MySQL, or just about any other SQL relational database ever created by man.

How to creating Database Connection
By default, the SqlDataSource control is configured to connect to Microsoft SQL Server version 7.0 or higher. The default provider used by the SqlDataSource control is the ADO.NET provider for Microsoft SQL Server.
Example :
< %@ Page Language="VB" %>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
< xmlns="http://www.w3.org/1999/xhtml">
< id="Head1" runat="server">
<>Show Example Connection
< /head>
<>
< id="form1" runat="server">
<>

< id="grdTeacher" datasourceid="srcTeacher" runat="server">

< id="srcTeacher" selectcommand="SELECT * FROM Teacher" connectionstring="Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|MyData.mdf; Integrated Security=True;User Instance=True" runat="server">

< /div>
< /form>

< /body>
< /html>

This connection string connects to an instance of SQL Server Express located on the local machine and a database file named MyData.mdf. The connection string uses Integrated Security (a Trusted Connection) to connect to the local database.

Saturday, May 3, 2008

More about AJAX

I found a website that contains more about AJAX. This include AJAX example, AJAX tools and many more, check in here




Free Traffic

 Join My Community at MyBloglog! Blog Flux Directory 

Web Developement Blogs - BlogCatalog Blog Directory web development blog  Internet Blogs - Blog Top Sites 

Blog Directory 

Click Here for Free Traffic!

Link2Communion.com