Tuesday, February 19, 2013

MOST ANTICIPATED GAMES OF 2013

10 most anticipated games of 2013

top-10-games-expected-in%202013.jpg




















At E3 last year, we saw gaming franchises share with us with some of the most awaited games across platforms. While some games were mere teasers, others were shown off through interesting gameplay 
footages. This year we expect to see some of these games arriving on store shelves. So which ones are they going to be? Here's a list of the top 10 games that are likely to launch this year and make 2013 memorable.


1. The Last of Us (PS3 exclusive)
Ever since Naughty Dog gave us Crash Bandicoot, the Jak and Daxter Series and the immensely popular Uncharted franchise, we've been waiting to see what's next. The answer is The Last of US. First teased at the Spike Video Game Awards last year, the game features a father-daughter duo portrayed by Ellie and Joel, who begin their journey from the post apocalyptic city of Pittsburgh, gradually exploring other areas out of the city. This PS3 exclusive draws inspiration from various movies and novels like I Am Legend and City of Thieves. The game is all set to debut on 7 May 2013.




2. Tomb Raider (PS3, Xbox 360, PC)
Developer Crystal Dynamics has planned to reboot the franchise with a young Lara Croft embarking on a quest for survival that unfolds her identity as the Tomb Raider. Players will get a chance to play various side quests, explore the island and face other challenges. In-game graphics of this open-world action adventure game look stunning and so do the interesting bits revealed in gameplay footage so far. Will this game prove successful as other games in the Tomb Raider franchise? Find out on 5 March 2013 when the game releases across platforms.




3. Dead Space 3 (PC, PS3, Xbox 360)
The third installment in the Dead Space series, the game features a new co-op campaign as well as a new playable character that will be named John Carver. Set on a new frost planet of Tau Volantis, the game follows lead protagonists Isaac Clarke and John Carver to end the Necromorph invasion once and for all. Towards that endeavour, the duo must overcome avalanches, treacherous ice-climbs, and the violent wilderness in order to save the earth from an imminent armageddon. The E3 trailer's ending was typical Dead Space style with main protagonist Isaac Clarke being eaten by a large red insect and showing his effort to fight against the insect's digestive elements and his fate left uncertain. Don the role of Isaac Clarke on 5 February 2013.




4. Metal Gear Rising: Revengeance (PS3, Xbox 360)
A spin-off in the Metal Gear series, this action-paced game from Platinum Games is set to take place several years after Metal Gear Solid 4: Guns of Patriots. The game focuses on cyborg Ninja Raiden fighting cyborg enemies while attempting to rebuild an unknown country and is expected to include more action sequences. Get ready to slash enemies and objects at will in 19 February 2013;




5. God of War: Ascension (PS3 exclusive)
God of War Ascension is a prequel in the God of War franchise and will narrate the story of Kratos before he became the Ghost of Sparta. In this seventh iteration of the series, vengeance is the focal point as a younger Kratos is out to seek revenge for being tricked into killing his wife and child by Ares. The game is a first in the series to offer multiplayer support for upto eight players. Set out to avenge Kratos' wife and child on 12 March 2013.



6. Beyond: Two Souls (PS3 exclusive)
Heavy Rain developer Quantic Dream unveiled its newest and upcoming game titled 'Beyond: Two Souls'at E3 last year, narrating the story of Jodie Holmes played by Ellen Page. Players get to journey through Jodie's life to discover the true meaning of the entity, Idan, alongside her throughout the story. The plot revolves around question about what happens after humans die and promises an experience never like before. Want to find the answers? Beyond: two Souls releases this year.



7. Gears of War: Judgment (Xbox 360 exclusive)
Co-developed by Epic Games and People Can Fly, this version of the game is a prequel that takes place years before the concluding events of Gears of War 3. But even though the major storyline seemed to have concluded fairly definitively, the series is too popular to simply let die. Odds are that we will once again see Marcus Fenix chainsaw something, but for now the series switches to Augustus Cole and Damon Baird and a story from the early days of the war against the Locust. New multiplayer modes will be present, of course and the campaign will expand on the mythology that made this series one of the best on the Xbox. Keep an eye on this one for it releases on 19 March 2013.



8. GTA V (PS3, Xbox 360)
A first major title in the Grand Theft Auto series since 2008, the 15th game in the overall series, GTA V is set in Los Santos in the state of San Andreas and its surrounding areas, based on modern-day Los Angeles and Southern California. Developer Rockstar says that the game will focus on  "the pursuit of the almighty dollar". For the first time in the Grand Theft Auto series, GTA V will feature three playable protagonists. The multiplayer mode will feature "Crews" similar to Max Payne 3. A new Social Club functionality will connect play across multiple titles, starting with Max Payne 3 and GTA V. Playing the multiplayer mode in both games allows crews seth up in one game to be carried over to the other. Race your way in the sec on quarter of this year with GTA V.



9. Star Trek (PS3, Xbox 360, PC)
Developed by Namco Bandai Games in association with Paramount Studios, little details are known about this epic action action adventure. What is known is that it features an original storyline and offers immersive co-op gameplay featuring Kirk and Spock, who lead up the fight against the Gorn, an enemy not seen since the days of Star Trek The Original Series. Hop on-board the adventures of the U.S.S. Star Enterprise in Q1 2013.



10. BioShock Infinite (PS3, Xbox 360, PC)
BioShock Infinite is a first-person shooter game set in the year 1912. As the game's lead protagonist, former Pinkerton agent Booker DeWitt, you make your way across the floating air-city of Columbia to find a young woman, Elizabeth, who has been held captive there for the last twelve years. After a successful rescue attempt, both are pursued by the city's warring factions; the nativist and elite Founders that strive to keep the city for pure Americans and the Vox Populi, a rebel grouping representing the common people. Booker discovers that Elizabeth is key to this conflict and that she is endowed with strange powers to manipulate rifts in the time-space continuum that ravage Columbia. After being postponed last year, the third installment in the BioShock series is set to release on 26 March 2013.



Well, that concludes our top 10 list.


Monday, January 28, 2013

Upload and download files asp.net

Save/Upload files in folder and download files from folder in asp.net

Introduction: 
In this article I will explain how to save/upload files in folder and download files from folder system when click on link in gridview using asp.net.

Description: 

In many websites we will see download link whenever we click on that we will have a chance to download that files into our system. 

Generally we have different ways to save files like directly in our database or our project folder. If we save files in our database it will occupy more space so it will create problem for us after host website because host providers will provide limited space for us we can solve this problem by saving files in our project folder.
To implement this first design table in your database like below to save file details in database.
Column Name
Data Type
Allow Nulls
Id
int(set identity property=true)
No
FileName
varchar(50)
Yes
FilePath
varchar(50)
Yes

Now create new website after that right click on your website and add new folder and give name as Filesbecause here I am using same name for my sample if you want to change folder name you need to change the Files folder name in your code behind also
After that design your aspx page like this


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Save and Download Files from file system</title>
<style type="text/css">
.modalBackground
{
background-colorGray;
filteralpha(opacity=80);
opacity0.8;
z-index10000;
}

.GridviewDiv {font-size100%font-family'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial,Helevetica, sans-serifcolor#303933;}
Table.Gridview{border:solid 1px #df5015;}
.Gridview th{color:#FFFFFF;border-right-color:#abb079;border-bottom-color:#abb079;padding:0.5em0.5em 0.5em 0.5em;text-align:center}
.Gridview td{border-bottom-color:#f0f2da;border-right-color:#f0f2da;padding:0.5em 0.5em 0.5em0.5em;}
.Gridview tr{colorBlackbackground-colorWhitetext-align:left}
:link,:visited { color#DF4F13text-decoration:none }

</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="fileUpload1" runat="server" /><br />
<asp:Button ID="btnUpload" runat="server" Text="Upload" onclick="btnUpload_Click" />
</div>
<div>
<asp:GridView ID="gvDetails" CssClass="Gridview" runat="server" AutoGenerateColumns="false"DataKeyNames="FilePath">
<HeaderStyle BackColor="#df5015" />
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" />
<asp:BoundField DataField="FileName" HeaderText="FileName" />
<asp:TemplateField HeaderText="FilePath">
<ItemTemplate>
<asp:LinkButton ID="lnkDownload" runat="server" Text="Download" OnClick="lnkDownload_Click"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
After completion of aspx page design add the following namespaces in code behind

C# Code


using System;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Web.UI.WebControls;
After that write the following code in code behind


private SqlConnection con = new SqlConnection("Data Source=SureshDasari;Integrated Security=true;Initial Catalog=MySampleDB");
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
BindGridviewData();
}
}
// Bind Gridview Data
private void BindGridviewData()
{
con.Open();
SqlCommand cmd = new SqlCommand("select * from FilesTable",con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
gvDetails.DataSource = ds;
gvDetails.DataBind();
}
// Save files to Folder and files path in database
protected void btnUpload_Click(object sender, EventArgs e)
{
string filename = Path.GetFileName(fileUpload1.PostedFile.FileName);
fileUpload1.SaveAs(Server.MapPath("Files/"+filename));
con.Open();
SqlCommand cmd = new SqlCommand("insert into FilesTable(FileName,FilePath) values(@Name,@Path)",con);
cmd.Parameters.AddWithValue("@Name",filename );
cmd.Parameters.AddWithValue("@Path""Files/"+filename );
cmd.ExecuteNonQuery();
con.Close();
BindGridviewData();
}
// This button click event is used to download files from gridview
protected void lnkDownload_Click(object sender, EventArgs e)
{
LinkButton lnkbtn = sender as LinkButton;
GridViewRow gvrow = lnkbtn.NamingContainer as GridViewRow;
string filePath = gvDetails.DataKeys[gvrow.RowIndex].Value.ToString();
Response.ContentType = "image/jpg";
Response.AddHeader("Content-Disposition""attachment;filename=\"" + filePath + "\"");
Response.TransmitFile(Server.MapPath(filePath));
Response.End();
}
VB.NET Code

Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports System.Web.UI.WebControls

Partial Class Default
Inherits System.Web.UI.Page
Private con As New SqlConnection("Data Source=SureshDasari;Integrated Security=true;Initial Catalog=MySampleDB")
Protected Sub Page_Load(ByVal sender As ObjectByVal e As EventArgs) Handles Me.Load
If Not IsPostBack Then
BindGridviewData()
End If
End Sub

' Bind Gridview Data
Private Sub BindGridviewData()
con.Open()
Dim cmd As New SqlCommand("select * from FilesTable", con)
Dim da As New SqlDataAdapter(cmd)
Dim ds As New DataSet()
da.Fill(ds)
con.Close()
gvDetails.DataSource = ds
gvDetails.DataBind()
End Sub

' Save files to Folder and files path in database
Protected Sub btnUpload_Click(ByVal sender As ObjectByVal e As EventArgs)
Dim filename As String = Path.GetFileName(fileUpload1.PostedFile.FileName)
fileUpload1.SaveAs(Server.MapPath("Files/" & filename))
con.Open()
Dim cmd As New SqlCommand("insert into FilesTable(FileName,FilePath) values(@Name,@Path)", con)
cmd.Parameters.AddWithValue("@Name", filename)
cmd.Parameters.AddWithValue("@Path""Files/" & filename)
cmd.ExecuteNonQuery()
con.Close()
BindGridviewData()
End Sub

' This button click event is used to download files from gridview
Protected Sub lnkDownload_Click(ByVal sender As ObjectByVal e As EventArgs)
Dim lnkbtn As LinkButton = TryCast(sender, LinkButton)
Dim gvrow As GridViewRow = TryCast(lnkbtn.NamingContainer, GridViewRow)
Dim filePath As String = gvDetails.DataKeys(gvrow.RowIndex).Value.ToString()
Response.ContentType = "image/jpg"
Response.AddHeader("Content-Disposition""attachment;filename=""" & filePath & """")
Response.TransmitFile(Server.MapPath(filePath))
Response.[End]()
End Sub
End Class



Demo




You might also Like: