Posts Tagged ‘C#’

The type ‘‘ exists in both ‘‘ and ‘

See this link for more ideas: http://forums.asp.net/t/980517.aspx

I got this error. I tried a variety of things. Changing “CodeFile” to “CodeBehind” broke things. Changing Class names didn’t quite work. It would work if I hit debug from VS but publishing failed. Just on a whim I unchecked the box that allowed for precompiled sites to be updated (I don’t need it, some might, but I didn’t) and bam! It works!

Shiny :)

Go straight to Post

Leave a Comment

GridView Paging in ASP.NET 2.0

I am posting this on a well covered topic, because the examples I saw online were stupidly complex for this simple task. Now, I don’t mean to say that this is the most efficient method, but for smaller sets of data (we have less than 1000 records returned from this query) it is fast and easy.

Obviously, make sure you have the GridView set to allow paging. You will need to add an event handler for the GridViewPageIndexChanging (Not “Changed”). There is a private property for the class, ds which is a custom DataSet we have in our application. Any DataSet or DataTable (binding source?) will (should) work.
[code lang="c"]protected void gvUsers_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
DataTable dt = ds.GetUsers;
gvUsers.DataSource = dt;
gvUsers.PageIndex = e.NewPageIndex;
gvUsers .DataSource = dt;
gvUsers .DataBind();
}[/code]

Go straight to Post

Leave a Comment

WinZip vs 7zip: First round – Misc Textual Documents

So, I was a lot closer to having this “mostly” working than I thought. After some trial and error with 7zips command line arguments I got a few good test runs in. I need to work with some different data to further confirm, but so far, it seems that 7zip is pure win!

winzip-vs-7zip

See the text results below:

Starting WinZip…
WinZip finished… reporting…

Start Ticks: 633616615839494087
End ticks: 633616615845744327
Time to completion (ticks): 6250240
Time to completion (ms): 625.024

Starting 7Zip…
7Zip finished… reporting…

Start Ticks: 633616615846681863
End ticks: 633616615859338599
Time to completion (ticks): 12656736
Time to completion (ms): 1265.6736

Press esc or enter key too continue…

Starting 7Zip…
7Zip finished… reporting…

Start Ticks: 633616617982545127
End ticks: 633616618061454407
Time to completion (ticks): 78909280
Time to completion (ms): 7890.928

a 7zip with max compression?

Starting 7Zip…
7Zip finished… reporting…

Start Ticks: 633616621970019726
End ticks: 633616622006270886
Time to completion (ticks): 36251160
Time to completion (ms): 3625.116

Go straight to Post

Comments (1)