Since the time it was launched last year , Microsoft's Silverlight has been a centre of attraction for one and all. Right from its look and feel , the type of applications it can develop, it's functionality and many more , were the points of concern . But Silverlight has achieved 'em all , thanks to Microsoft . So finally , Silverlight 3 has been released .
The main features which constitute Silverlight 3 are
1) HD Media
2) Immersive Graphics
3) Out of browser support
4) Application Development
Scott Guthrie has explained each and every point in detail .Please have a look at it .
a520107d-afc3-488e-830a-694404da17ba|0|.0
Tags:
silverlight,
asp.net,
microsoft
Categories:
Silverlight
Posted by Talib on August 4, 2009 03:55
Actions:
E-mail |
Permalink |
Comment RSS
Of late, there has been a lot of speculation about AJAX Control Toolkit's AutoComplete Extender. Basically , this control loads the data specific to the entered text..
So now we will see as to how to connect this control to database and fetch the data when the user enters a specific word or phrase.....
AutoComplete.aspx


Now let us see the code for web service that will help us in fetching the data..
AutoComplete.cs
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class AutoComplete : WebService
{
[WebMethod]
public string[] SearchDB(string prefixText, int count)
{
if (count == 0)
{
count = 10;
}
SqlConnection con = new SqlConnection("server=localhost;database=your database;uid=your username;pwd=your pwd");
string str = "select * from table where username like @prefixText";
con.Open();
SqlDataAdapter da = new SqlDataAdapter(str, con);
da.SelectCommand.Parameters.Add("@prefixText", SqlDbType.VarChar, 50).Value = prefixText + "%";
DataSet ds = new DataSet();
da.Fill(ds);
int cnt = ds.Tables[0].Rows.Count;
List items = new List(cnt);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
items.Add(ds.Tables[0].Rows[i]["UserName"].ToString());
}
return items.ToArray();
}
}
Stylesheet.css
/* AutoComplete highlighted item */
.autocomplete_highlightedListItem
{
background-color: #ffff99;
color: black;
padding: 1px;
}
/* AutoComplete item */
.autocomplete_listItem
{
background-color : window;
color : windowtext;
padding : 1px;
}
Now let's check out the result after running the application ..

NOTE:Please do comment regarding the article as it'll help me to write even more specifically..
96f786bb-bddc-4255-b857-756aaf735f75|1|5.0
Tags:
asp.net,
ajax,
.net,
c#,
autocomplete,
extender,
database
Categories:
ASP.NET
Posted by Talib on July 10, 2009 00:24
Actions:
E-mail |
Permalink |
Comment RSS
Sometimes what happens is , when you are working on some maintainence stuff on your website , then you need to STOP the application from functioning. This could prove to be a tedious task . So as a solution to this ,comes another amazing feature of Visual Studio.Net which we will see in the coming lines below.
Create a file named "app_offline.htm" in the root of the application . When ASP.NET sees it, it will shut-down the app-domain for the application (and not restart it for requests) and instead send back the contents of the app_offline.htm file in response to all new dynamic requests for the application. So when you are done updating the site, just delete the file and it will come back online.
So if you use the app_offline.htm feature, you should make sure you have at least 512 bytes of content within it to make sure that your HTML shows up to your users.
For example :
This page is U N D E R C O N S T R U C T I O N !!. Please visit after sometime. Thank You !!
6fc541c9-2d36-4fa8-bb33-6fa45ec20584|1|5.0
Tags:
app_offline,
application,
offline,
asp..net,
.net
Categories:
ASP.NET
Posted by Talib on July 10, 2009 00:11
Actions:
E-mail |
Permalink |
Comment RSS
From my previous experiences , what i have found out is that sometimes we need to disable the previous and coming dates in a calendar control. So finally i thought to post it out. It goes like this....,
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date< DateTime.Today)
{
e.Day.IsSelectable = false;
e.Cell.ToolTip = "This date is not available";
}
else if (e.Day.Date> DateTime.Today)
{
e.Day.IsSelectable = false;
e.Cell.ToolTip = "This date is not available";
}
}
Keep rockiin........
8c3ab124-55a3-4dff-88c1-bc924faa4334|0|.0
Tags:
asp,
asp.net,
c#,
disable dates,
calendar
Categories:
ASP.NET
Posted by Talib on July 9, 2009 23:28
Actions:
E-mail |
Permalink |
Comment RSS