asp.net

How to limit users to Login?

I have a scenario in which I have to restrict the users for login as per following details: Whenever 500th user try to login My web-site there would be a message "User login exceeds, please login later!". Only 499 users can login at a time, 500th user is the Admin. Also need to show online users in admin page-view. So, how to calculate...

Grid View Summary / Detail (Tabs?)

I have a very specific problem with a Gridview I am displaying. Believe it or not my customers need to see roughly 30 columns for a particular report. Obviously displaying these legibly is impossible and I am looking for suggestions on how to achieve this neatly? I was thinking Ajax tabs groups columns together naturally on differing ...

Looking for Guidance on Data Binding in ASP.NET Detail Forms

Several online searches give me the impression that very few people like to write about data binding when no object collections are involved. There are resources on using FormView etc. with data binding, but these are as scarce as rainbows in a coal mine. Could some of you please suggest some nice, thorough articles on data binding for...

Is there a way to insert Silverlight XAML into my page using ASP.NET code-behind?

So, I want to create some Silverlight charts from some data on my ASP.NET web page. The way to do this, either using Visifire (my current thing) or the upcoming Silverlight charting, seems to be to create some XAML, or at least some Silverlight objects (like in this Visifire sample), and then stuff them into the page somehow. Strangely,...

How to use System.Web.Abstractions in a Web Forms application?

I'm working on a web forms application which intends to be ported over to MVC for its vNext +1 release. But at the moment it's a .NET 3.5 SP1 web forms application. I'm wanting to have our own context which provides some helpers on top of the standard HttpContext/ HttpRequest/ HttpResponse/ etc objects. Also, I'm wanting to have decoupl...

what is the difference between ObjectQuery and "var" ?

Look please below what is the difference between two type of codes. is there any performance difference or what else? First Codes ObjectQuery departmans = staffContext.Departman; GridView1.DataSource = departmans; GridView1.DataBind(); Second Codes var departmans = staffContext.Depa...

how to select row om gridview by click?

How can i select row in gridview by clicking. But i want to add select id (from database such as primary id) in session. Listen please i dont want javascript Attribute method. Like that session["selectedrow"] = gridview1.selectedrow[" which id? "] ...

getting intellisense to show properties in markup for a custom server control

I have a custom control that inherits from UserControl, and I can't get it's properties to show in intellisense. For example, I have a property: public string Title; but if I start typing: ff:myControl Tit... Nothing shows up (like I think it should). I have tried adding attributes like Browsable, EditorBrowsable, etc, but nothing...

How to take value click gridview without js?

This below codes give me error below: How to generate this codes help me please!!! Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index protected void gvDepartman_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType....

HTTPS Auto-Login Probs

Hi Guys, I am trying to create a C# script to login automatically to a website and download a report. I have managed to login to the site. Effectively the steps are: 1) Get login form 2) Sent login/pass with cookies 3) Logged In 4) Ask for Report & Download The problem I am having is that 4).. doesn't work. It just keeps redirecting ...

Evaluation Sheet for Fresh .NET Developer ?

Dear All, We have some new fresh .net developers, and we will give them an ASP.NET task that should take about 2 weeks, after which we'll evaluate them individually, and choose to keep some of them. Can anybody suggest some basic points to take into consideration for this evaluation? If you have any references, that would also be welco...

How to customize publication in ASP.NET?

Hi Guys, I'm working on a fairly new project and we started from scratch. So not only the web application itself needs to get developed, but also the whole process of publishing the site and configuring the web server etc. need to be done from scratch. This question might be more apropriate for serverfault, but that really depends on t...

Modify linq query how to?

How can i shorter below codes than before? i need short and simple method: i dont want to use foreach loop because i have one value. public partial class Test : System.Web.UI.Page { StaffManagementEntities staffContext; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) ...

Why, if data source control is created via GridView’s Smart Tag, are parameters for…

Hello, 1) I’ve always manually created ( in source view ) data source control, but I noticed that when I define data source control via GridView’s Smart Tag --> Configure Data Source, then the corresponding markup ( which Asp.Net automatically generates for us ) for UpdateCommand, InsertCommand and DeleteCommand also includes declara...

If DataKeyNames is set to a field not defined as a primary key, then…

Hello, 1) I noticed that if I set GridView.DataKeyNames to a field that actually isn’t defined as primary key in data source, data source control ( or perhaps GridView?) will somehow know that field set in DataKeyNames isn’t really a primary key. I became aware of that fact when I opened Configure the Select Statement window ( via G...

standalone asp.net page

i want to test my web hosts asp.net capabilities - equivalent to a 'phpinfo' page - is there a standalone aspx page I can upload to test that asp.net is correctly running and what version etc it is running. Thanks, Josh ...

Sorting gridview using ado.net entity framework

i used below code to fill my gridview but i need sorting gridview . How can i do that in Ado.net enttiy framework? (Sorting gridview if filling gridview with ado.net entity ) void LoadStaffPersonel() { int selectedDepartman = Convert.ToInt32(Request.QueryString["SelectedDepartmanID"]); string name = "...

Return ASP DDL or Telerik control

I'm trying to write a more generic method that will populate either an ASP.NET dropdownlist OR a telerik RadComboBox with states. I'd like to pass the control in as a parameter to the method. I have a DataTable that holds all the states, which I loop through (see below) - I'd like to make this applicable to a Telerik RadComboBox - so I...

how to design a game web app?

i know vb.net, but have had no experience at all with web programming. i need to make a web app that can run in a browser where there is a board game and pieces that you can move around. can someone help me get started? are there any examples in asp.net? i need something like this: http://www.hallofbrightcarvings.com/game/grid i don't...

Find the ID after compiling

When you assign something an ID in asp.net such as: <asp:Label runat="server" ID="mylabel" Text="some text"></asp:Label> The code behind ID you use to reference that object is mylabel. However after the site has compiled and is running the ID in the HTML changes to something a bit more abscure <asp:Label runat="server" ID="ct100_bl...