There are a few ways to write out this method (to randomize an arraylist). Here is the fastest way to never get the same results and will always be randomized because it's based off of "TIME"...
[CODE=cpp]
protected void Page_Load(objec t sender, EventArgs e)
{
ArrayList myArrayList = new ArrayList();
myArrayList.Add ("First");
myArrayList.Add ("Second");
myArrayList.Add ("Third");...
User Profile
Collapse
-
If you are wanting to call a method from a "Master Page's Code Behind Page" then you will have to declare the following in the HTML side of your ASPX page.
[CODE=html]
<%@ MasterType VirtualPath="~/MasterPage1.mas ter" %>
[/CODE]
So an example of the HTML page would be:
[CODE=html]
<%@ Page Language="C#" MasterPageFile= "~/MasterPage1.mas ter" AutoEventWireup ="true"...Leave a comment:
-
To begin, there are many ways to accomplish this task. This "JOIN" feature in SQL is very useful and can be used in many instances to "SELECT" data from multiple tables. Here is a small example of how we would use a "JOIN" statement and how we would use it with our C# ASP.NET application.
For this example, we have created 1 SQL Stored Procedure, 1 ASP.NET 2.0 Page with C# Code Behind Page. We are using...Leave a comment:
-
Post your code for this C# method and we may be able to look at the syntax to see if it's incorrect somewhere....Leave a comment:
-
If you are searching for an example on how to correct your error "Could not find installable ISAM" you may want to search here: http://support.microsoft.com/kb/209805
If you are searching for an example on how to upload Excel data into SQL Server Table here is how you do it:
[CODE=vb]
Public Sub ReadDataFromExc elIntoSqlServer ()
Try
Dim excelConnection String As String = "Provider=Micro soft.Jet.OLEDB. 4.0;Data...Leave a comment:
-
The following link shows a great example on how to use mutex.
http://msdn2.microsoft.com/EN-US/lib...ex(VS.71).aspx...Leave a comment:
-
If you are looking to "JOIN" data from different tables you can do this within your stored procedure.
Here is an Example:
[CODE=SQL]
CREATE PROCEDURE [User_GetDetails _ByID]
(
@UserID int
)
AS
SELECT
tblA.UserID,
tblA.FavoriteCo lorID,
tblB.ColorName,
tblA.FirstName,
tblA.LastName
FROM
Users tblA
LEFT JOIN Colors tblB ON tblA.FavoriteCo lorID...Leave a comment:
-
Okay, you created a class as "data.vb" and in that class you set a public string equal to "ABC", within your code behind page for example "Default.aspx.v b" you would like to get this value and put it in a label control on page load.
ASP.NET VB.NET HTML CODE PAGE (Default.aspx)
[HTML]
<%@ Page Language="VB" AutoEventWireup ="false" CodeFile="Defau lt.aspx.vb" Inherits="_Defa ult"...Leave a comment:
-
Okay so paging is the way you would like to have the users view the records on the page as well as use in-line sql.
Here is a small example of how you can accomplish this task using C# ASP.NET 2.0 Visual Studio 2005 (or Visual Web Developer - free download from http://msdn2.microsoft.com/en-us/express/aa700797.aspx) and the SQL Northwind Database. This example also uses post backs on the page, so if you need it to be asyncronous we...Leave a comment:
-
Here are a couple of things to consider first before we continue figuring out the best way to resolve your issue...
1.) Are you trying to fill a gridview control with 20,000 items on the same page?
2.) Have you considered using grid view paging with maybe 100 items per page?
I ask you this because if you are trying to bind 20,000 rows of data from a SQL database into an ASP.NET Server Control it's going...Leave a comment:
-
Can you please provide more information. For example, what is executing within the page load event? Are you able to get to other .ASPX pages within the same project when browsing through localhost? Does it work locally, but throws exception when you copy it out to server, etc...Leave a comment:
-
There are many ways to approach this scenario and accomplish what you are trying to write. The above sample code posted by shweta123 is a nice example but I do recommend a little different road to take.
This example above uses in-line SQL statements, one major mistake if you want to become victim of SQL injection attacks. But it really just depends on how secure and "code tight" you want your application. In the beginning,...Leave a comment:
-
I know this may have been posted a while back, but here is the answer for future readers who may be searching for this answer:
GridViewRow DataKeyName Value
IMPORTANT: Make sure you have set the DataKeyNames value equal to the ID your trying to find (example: EmployeeID from a database table with a list of Employee Information)
Scenarios:
1.Scenario)
If you have a GridView control...Leave a comment:
No activity results to display
Show More
Leave a comment: