Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

c#

Get current System.Web.UI.Page from HttpContext?

September 2, 2022 by Magenaut

This is actually a two part question. First,does the HttpContext.Current correspond to the current System.UI.Page object?

Categories ASP.NET, Q&A Tags asp.net, c#, httpcontext Leave a comment

How to use custom Authorize attribute for roles as well as a specific user?

September 2, 2022 by Magenaut

I have my Action Method

Categories ASP.NET, Q&A Tags .net, asp.net, asp.net-mvc-3, c# Leave a comment

Write to CSV file and export it?

September 2, 2022 by Magenaut

In C# ASP.net, could someone show me how I can write entries from an Array/List to a CSV file on the server and then open the file? I think the second part would be something like – Response.Redirect(“http://myserver.com/file.csv“), however not sure on how to write the file on the server.

Categories ASP.NET, Q&A Tags asp.net, c#, csv, export Leave a comment

Loop through all controls on asp.net webpage

September 2, 2022 by Magenaut

I need to loop through all the controls in my asp.net webpage and do something to the control. In one instance I’m making a giant string out of the page and emailing it to myself, and in another case I’m saving everything to a cookie.

Categories ASP.NET, Q&A Tags asp.net, c#, master-pages, webforms Leave a comment

How do I get the access token from a blazor (server-side) web app?

September 2, 2022 by Magenaut

After implementing openidconnect, where does blazor store the access token? how to retrieve it?

Categories ASP.NET, Q&A Tags asp.net, blazor, blazor-server-side, c# Leave a comment

How do I loop through rows with a data reader in C#?

September 2, 2022 by Magenaut

I know I can use while(dr.Read()){...} but that loops every field on my table, I want to retrieve all the values from the first row, and then second… and so on.

Categories ASP.NET, Q&A Tags asp.net, c#, datatable Leave a comment

Do I have to Close() a SQLConnection before it gets disposed?

September 2, 2022 by Magenaut

Per my other question here about Disposable objects, should we call Close() before the end of a using block?

Categories ASP.NET, Q&A Tags asp.net, c#, sqlcommand, sqlconnection, using Leave a comment

DateTime.Parse(“2012-09-30T23:00:00.0000000Z”) always converts to DateTimeKind.Local

September 2, 2022 by Magenaut

I want to parse a string that represent a DateTime in UTC format.

Categories ASP.NET, Q&A Tags .net, asp.net, c#, datetime, utc Leave a comment

Writing file to web server – ASP.NET

September 2, 2022 by Magenaut

I simply want to write the contents of a TextBox control to a file in the root of the web server directory… how do I specify it?

Categories ASP.NET, Q&A Tags asp.net, c#, file, streamwriter Leave a comment

Get Row Index on Asp.net Rowcommand event

September 2, 2022 by Magenaut

I have an asp.net GridView:

Categories ASP.NET, Q&A Tags asp.net, c#, gridview, rowcommand Leave a comment
Older posts
Newer posts
← Previous Page1 … Page109 Page110 Page111 … Page451 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress