asp.net

What is NHibernate?

As a followup to my previous question. I am an ASP.NET Programmer, and am wondering how NHibernate would help me get my job done easier and more quickly than it would otherwise. Pretend I know nothing about NHibernate. What is it, and what can it do for me? ...

sum column values and display in footer in C#

Hi, I've the following code which is used to display ItemID, Name, and Price via SQLDATASOURCE. How is it possible to get the SUM of the values in the Price column and display it in the footer? <asp:GridView ID="GridView2" runat="server" ShowFooter="true" AutoGenerateColumns="False" DataKeyNames="ItemID" DataSourceID="SqlDataSource...

Something wrong when i want to read my cookie - using ASP.NET

I am using ASP.NET and VB.NET 2.0..................................... This is my code i use when i create my Cookie If dlgLogin.RememberMeSet = True Then Dim RateCookie As New HttpCookie("LoginInfo") RateCookie.Values("Email") = dlgLogin.UserName RateCookie.Values("Password") = dlgLogin.Password RateC...

ASP.NET MVC MembershipService Email

I have been working on an MVC project and I everything works at the moment except I can't force the user to confirm the email address before I active the user's account. I am using the built-in MembershipService/MembershipProvider that came with MVC. I was thinking of sending a normal email using an SmtpClient and MailMessage and then m...

jQuery LightBox( SlimBox): How to populate an ASPX file inside it ?

Dear All. I am having an ASPX page and i m trying to using jQuery light box(slimbox).I am able to invoke the Lightbox.Now i want to show the content of another page in this lightbox.Ex : I have a data entry form for user registration(signup.aspx).I want to show this when user clicks on the link (which is now showing image in the light b...

Dealing with expandable jQuery content if javascript disabled

I have a messaging tool within the website I am currently working on. The idea is to have a header div and a details div (display="none") for each message. Ideally, if javascript enabled, I have just the header showing and when the user clicks on it, the details div slide open. This is fine but how should I work it if javascript is ...

ASP.NET - Hard question about impersonation

I am building an ASP.NET application. The application uses forms authentication. I am not using roles. However, my account has a flag associated with it that signals I am an administrator. As an administrator, I would like to call another page in the application via Server.Execute. When I call this page though, I would like to call it a...

How can I make a primary key as AUTOINCREMENT in vb.net 2008?

I have table in a DB and the primary key is the 'TID' column, and I want to make it as AUTOINCREMENT, but I can't, because the "Identity specification" is turned off! See this picture: http://www.rofof.com/img2/6xsbuy6.gif How can I do it? Thanks! ...

should edit and create forms be the same one?

In many applications the "create new record" and "edit existing record" forms are very similar or even identical. Is it a good idea to use the same code unit for these two (same winform or html page or whatever) or would it cause trouble in the long run? ...

how to set IDENTITY_INSERT as ON ?

in the first I ask the admin to remove this post: 'how-can-i-make-a-primary-key-as-autoincrement-in-vb-net-2008/959787#959787' because I am facing a problem with comment and when I try to add comment the error message is apper: "commenting requires 50 reputation -- see faq" ! Here just I want to ask about IDENTITY_INSERT, how can I set...

Setting Vertical-Align for a button

I have a in a user control. In that, I have added a HTML table in which there is a button. I need to have the buttons aligned to the bottom of the cell. I tried setting the property in the CSS file the style does not gets applied. What is it that I am doing wrong? ASCX file: <link href="CSSFile.css" rel="stylesheet" type="text/css" /> ...

Page.Request.UserHostAddress is in an invalid format

Sometimes my ASP.NET application returns a value of "::1" when querying Page.Request.UserHostAddress. I can't see any pattern as to when it returns a correct IP address vs when it returns the incorrectly formatted string. It will work for half a day and then stop working for an hour randomly. Any thoughts? Edit: Okay, it's the loopbac...

Alternative of ASP.NET's UserControls in PHP?

I have developed many web applications in ASP.NET in which I have make use of UserControls to manage header footer and any other common part of a web page. Now I am developing an app in PHP, is there anything which I can use as an alternative of UserControls?? How I can implement the similar concept in PHP? Thanks? ...

Migrating asp .net 2.0 application latest .net version(design question)

Hi I have a web application built in the asp.net 2.0 MVC pattern. Now the clients want to update this application with rich UI experience and the latest .net technologies. Can anyone suggest whether I should use WPF or Silverlight: which one should I choose to change the application per the client requirement? I should be able to re...

Elmah basic setup questions/issues ...

I'm not finding this to be easy to setup; either there is a missing step in the setup configuration, it isn't work correctly, or I don't actually understand it's purpose. There is something definitely wrong here. The problem must obviously be me. I'm just not getting this to work. Here's what I've done. Create a brand new mvc applicat...

C# XmlDocument.LoadXml And Wildcards

I have an asp.net application and I'm using C#. I want to use the XmlDocument.LoadXml() method to read from an .xml file. However, the xml file will not always have the same name so I wanted to pass into the LoadXml() method the path to the file and then read any .xml files that are inside. So, something like this LoadXml(C:\Docs*.xml). ...

is there any function to generate a UNIQUE string or UNIQUE number ?

I need for function to generate a UNIQUE string, like: DIM uniStr as string = generateUniStr() is there any function already do this ? ...

How do I set controls' values of a repeater control regardless to their data

This is the repeater: <asp:Repeater ID="rptrReports" runat="server"> <ItemTemplate> <div style="margin: 2"> <asp:Label ID="lblAccount" runat="server" Text='<%#Eval("Account").FullName%>' />&nbsp; <asp:TextBox ID="txtDescription" runat="server" MaxLength="256" Text='<%#...

ASP.NET beginner woes with new Web Site

I'm a decently experienced .net developer for the desktop but this is my first stab at using ASP.NET and i'm stumped almost right away. I've used the VS2008 "New Website" wizard and got a simple page working, codebehind page and all. But my next step of adding a simple static class for some utility methods to be used by all pages is not...

Question about events and custom server controls

This is something which has always puzzled me. If I want to make a custom control, in this case a child of the Datagrid control, but I want to ensure that when I hover my mouse over a specific cell, there is a rollover colour. If the datagrid doesn't have any provision of doing this (For argument's sake), do I have to get the co-ordinat...