asp.net

change master page <a href link from content page

i have this on my master.page <ul class="menu"> <li class="first" runat="server" id="Li2"> <a runat="server" id="A1" href="../NewEntry.aspx">Create a New Entry</a> </li> </ul> when i go to content page ("NewEntry.aspx") i want the link name to be changed to "Update Entry" <ul class="menu"> <li class="first" runa...

Multiple References to the JQuery Library in a page.

I have an ASP.NET application using a master page. I am adding a reference to the JQuery library in the master page however there are some content pages and user controls that reference the JQuery library directly. Will I need to remove each reference from those pages or can I leave them in place even though I am adding a reference int...

Regex for anything between []

Hi, I need to find the regex for [] For eg, if the string is - Hi [Stack], Here is my [Tag] which i need to [Find]. It should return Stack, Tag, Find ...

exporting whole page to pdf with iTextSharp

hi there i need to export a pages to pdf, the pages will have grids on as they are reports. i have had a look at iTextSharp which for exporting JUST the grid works a treat. But when i try it with the whole page, it gets a bit confused with the images in the page, and doesnt deal with the styling particularly well.. is it possible to ex...

Stored Proc in sql that does not return the value

My function isn't returning anything - strReturn is empty: try { SqlParameter[] parameter = new SqlParameter[] { new SqlParameter("@MerchantID", MercahntID), new SqlParameter("@LoactionID", LoactionID) }; SqlHelper.ExecuteNonQuery(DbConnStri...

how to use Gridview AccessibleHeaderText in asp.net

Hi Everybody, I want to click on header of gridview to sort data in gridview . How to do that. and what is the use of AccessibleheaderText property. Thanks in advance ...

Best practice for authorization in the business layer?

What is the best way (for a .Net 4 project) to implement authorization in the business layer. Simply I want to check whether a certain identity can access a certain action/resource. I've tried to look this up in Patterns & Practices, but haven't found anything useful yet. And what about PrincipalPermission of ASP.Net 2.0? Is this still...

Spreadsheet like control in ASP.NET

Do you know any ASP.Net controls like Spread for ASP.NET that can render Excel like pages that has built-in formula evaluation? ...

is there a way to set an asp.net session variable from a javascript/jquery link?

Basically i am trying to set a session when a user clicks a specific button is this possible? So i need to set this session Session("TenHolStDateNewCheck") = "%" When this link is clicked <a href="availability.aspx" class="sidelink">blahblah</a> thanks Jamie ...

crystal report datasource to business layer object colletion

In my project I want to use data source for a crystal report as collection of business layer object. How do I do this? I have 3 projects together in my solution one of them is business object layer. In grid and comboboxes or other controls I am able to bind these objects to the collection directly. I know how to bind crystal report to t...

How do I retrieve the referrer page url once a custom error page is returned.

I'd like to capture the http referrer url following the rendering of a custom error page. I have this set in my web.config <customErrors mode="On"> <error statusCode="500" redirect="/StaticError.aspx" /> </customErrors> In the OnLoad(EventArgs e) event -- I'm trying to do this, but it appears to be too late. this.txtReferrer.Text ...

How to populate a gridview with table data from sql

I want to populate a gridview with table data from SQL. I tried just returning my SqlDataReader object and using it as my datasource, but I am getting errors that the reader has been closed. I wanted to convert this to a DataSet and just return a dataset, but I couldn't find an easy way to convert the row data to a dataset. I've also ...

User Control - Generic List Bindable Property

Hey SO, I am trying to create a User Control that accepts a generic List of CustomObject as a bindable property. I've hit a wall and can't figure it out. Any help would be greatly appreciated! I'd like it to look a little somthing like this : TabularReport.ascx [Bindable (true)] public IList<T> Source { get; set; ...

Webstatistics site, log clientside (javascript)? or serverside?

I an beginning an web application to log web-statistics (web requests, pageviews, etc) for my customers. Today more and more people are using ajax. So my question is, what is the best way to log an user visit. in javascript? or serverside? and then, what do i need to log? the page title? or the absolute url? or need customers choose thei...

Getting a column name in a Repeater in OnItemCreated

I am working on a Repeater that reads from a table with a layout something like: string Title string Location bool Water bool Sewer bool Picnic_Table bool On_Beach ... I am creating a list of amenities for each "Title" so I need to loop through the columns and get a list of amenities for each Title (or site). Optimally, I have a loop ...

Fluent Nhibernate No Persistor for Class Name

I am getting this error even though all my mappings are pretty simple and correct. I get this error only on select classes. Can someone help? ...

Limit DoD PKI Certificate Selection

Is there a way to limit the certificates listed in the dialog box when prompted for DoD PKI authentication? I'm trying to require the user to choose the email certificate. ...

Membershipprovider: Automatically logging out when session ends

Hi! I have some problems with getting my website to log out the authenticated user automatically when the session ends (the user closes the browser). This is what I have in my web.config: <authentication mode="Forms"> <forms name="AuthCookie" protection="All" loginUrl="~/default.aspx" path="/" cookieless="UseCookies" timeout="2592...

Why can't the "Server" Response Header be removed via web.config in IIS7?

http://stackoverflow.com/questions/1178831/remove-server-response-header-iis7 I know how to remove the Server response header with an HTTP Module based on the link above. I just want to know why it is necessary to remove it this way. ...

How to configure entity framework metadata locations for a web application

Hi, I am trying to configure Entity Framework 4 in the Web.config file using this ConnectionString ... metadata= res://*/CmsEntityDataModel.csdl| res://*/CmsEntityDataModel.ssdl| res://*/CmsEntityDataModel.msl; .... I would like remove the "*" and add the actual path for my dll file. How to find the path fo...