Tag: asp.net

How can I speed up search/browse/filter with 10 M products?

Background: I’m using SQL Server 2008 and ASP.NET 4 on Windows 2008 I have one table with about 10 million rows of products that I make available online for users to browse — not search. Each of the 10 million products have extra attributes — like categories — that I keep in lookup tables — […]

Procedure or function checkLogin11 has too many arguments specified exception

Although this stored procedure works for first time( for first login) and after logout or after re-run application, this stored procedure not work and throws “Procedure or function checkLogin11 has too many arguments specified exception”. I only supply required parameters and it work fine for first time and then it does not . Can’t understand […]

Converting issue Byte to Byte

i never work with Bytes before i have a getting error here in may code please have a look SqlDataReader reader = cmd.ExecuteReader(); reader.Read(); SqlDataReader dr = ExecuteReader(Globals.con, CommandType.Text, “select FileName,MediaData,Extension from media where Id=” + ID); string FileName=””; Byte[] MediaData= null; string Extension = “”; while (dr.Read()) { FileName = dr[“FileName”].ToString(); MediaData = Convert.ToByte(dr[“MediaData”].ToString()); […]

Upload Data from Local Database to Live Database in ASP.Net using SQL 2008

I am working on a web application which have two parts. 1) One is the online web site at online server. 2) The second is running on local machines/computers. The structure of database is same on both live and on local. Now a user can make changes on the local database and then publish them […]

Convert SQL connection from Asp classic to asp.net

I would like to convert my web pages from Asp classic to Asp.net (VB), What should I do instead of this code? conn.asp: <% Dim conn,connstr connstr = “Provider=sqloledb; Data Source=.\SQLEXPRESS ;Initial Catalog=My_DB ;User Id=sa;Password=12345” on error resume next set conn=server.createobject(“ADODB.CONNECTION”) conn.open connstr if err then err.clear set conn=nothing response.write “Connect Error!” response.End End IF […]

Linq Data Source WhereParameters with “\” in value

ASP.NET/C# project utilizing LinQ to SQL I have listbox, with values from database, which is used to filter Linq Data Source. Everything works fine until I have value in the listbox that contain “\”. eg “DOMAIN\Group Name”. any help would be appreciated! if (ddlAppGroup.SelectedValue != “*”) { LinqDataSource1.WhereParameters.Add(new Parameter(“ApplicationGroup”, System.Data.DbType.Int16)); LinqDataSource1.WhereParameters[“ApplicationGroup”].DefaultValue = ddlAppGroup.SelectedValue; if (LinqDataSource1.Where […]

How to generate crystal report in ASP.net C# using visual studio 2012?

I just recently installed Visual Studio 2012, everything’s working good with 2010 with my Crystal report but when I migrated the code to 2012 I can’t display anything. Can you pls check if there is something I’m missing with this code: protected void Page_Load(object sender, EventArgs e) { SqlConnection cnn; string connectionString = null; string […]

Saving Multiple Image Path url in Database at once

My multiple image upload code works fine. But while inserting the image path url in the database only one image path is saved. How can i save all the image path url’s at once. Here is my GetPictureData() public string GetPictureData() { string retFileName = “”; try { if (((FileUpload1.PostedFile != null))) { if ((FileUpload1.PostedFile.ContentType.ToUpper().Contains(“IMAGE”))) […]

Multiple Session Login

I would like to develop a functionality in ASP.Net , by which if one user is logined and if any other user is try to login with the same username,the very first user who is already login should get a message that another user is trying to login by your username something like this.Please guide […]

Putting dynamic string parameter in drop down menu server controls

I am new to .net/c# and visual studio. I have been looking all over the internet for an answer but couldn’t find it. Thanks for your help. I’m populating a drop down list from a database table, I want to pass a dynamic parameter to the asp server control (the logged in persons username). The […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.