asp.net-3.5

When should Page.Header.DataBind be called?

I'm trying to resolve correct paths to javascript scripts in my head section using: <script src="<%# ResolveUrl("~/Scripts/jquery-1.4.2.min.js") %>" type="text/javascript" /> In order to resolve the path I need to call databind using Page.Header.DataBind(); What event should I place the databind call in? Thanks. Reference: http://l...

page theme causing "Failed to load viewstate." error

In my web.config I have the following: <pages theme="myTheme" enableSessionState="true" validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false"> As soon as I added the theme property I instantly started to receive: Failed to load viewstate. The control tree into which v...

How to stop user from changing querystring

How do I protect the url from a user changing one of the param/value pairs? Thanks. ...

How to Make Math.Round for a Number

how to make the Rounded number ? Example : 3341.48 to 3342.00 ...

Showing number in 2 decimal places in gridview

Hi Everyone, i have one Gridview in my .aspx page.i am showing dynamic data in this grid.how i will show the float or double number in 2 decimal places in gridview. thanks in advance ...

Best practice for looking up a large number items from a list box

Hi All, I'm working on an ASP.NET project where a user sets up a work order that consists of generating documents for an arbitrary number of patients. Current UI design is as follows; A step of setting up a work order is selecting what patients to include. During this step, user can choose to select patient sites or patients. In either...

Asmx dynamic compilation

If I want to compile the source (cs) file of the web page, i simply use Src attribute instead of CodeBehind attribute in the Page directive, e.g. <%@ Page Language="C#" AutoEventWireup="true" Src="XXX.aspx.cs" Inherits="Namespace.Path.To.XXX" %> which works perfectly with a source file that has the BuildAction set to Content. Is it po...

Image tagging like movie ticket booking website

I am using aso.net and C#. I have to tag a image by getting the data from the database. Take an example, like in a online movie hall ticket booking website. If we book any seat and the data go into the database. Now next time if anyone open the website, those seat will be marked as red so that we can't select them [data is coming from t...

How to Pass Textbox Value to Method or Function

Hi, I have a class CURPRFC that contains the following: static public string CalcRFC(string firstname, string lastname, string middlename, string date) I'm calling this method/function in my codebehind as follows: CURPRFC.CalcRFC(txtfirstname.text, txtlastname.text, txtmidlename.text, txtdate.text) where each of the values are ...

Is ASP.NET with .NET 4 faster

I'm looking to upgrade my ASP.NET web app to the .NET 4 framework. Would I see performance improvements right away? ...

Change background color of cell (not control) in ListView

What or where in the code do I set the color for this background? ...

Active Directory / Distrubution List in.NET

I have the following code that gets the members of a distribution list but if there's a another list within it I'd like to get the members from it too. Try Dim path As String = String.Empty path = "LDAP://...." Dim de As DirectoryEntry = New DirectoryEntry(path) Dim ds As DirectorySearcher = New ...

Debugging the Javascript in my asp.net website

Hi, My webpage contains : I did a break points on the Tools.JS , but while debugging I didn't found my JS in Script Documents (Run Time mode) , and i remarked the exclamation message on my BP saying that this break point willn't be take in mind cause the JS document i...

Web.config ignoring module

I'm trying to use an http module and corresponding configuration section that I downloaded from http://www.codeproject.com/KB/web-security/WebPageSecurity_v2.aspx. However, my application seems to be ignoring these added items. I set up a test application with the specified configuration and it ran fine. When I tried to add the same...

chars like: ' or " in header script code become: &#39; or &quot;

I recently installed Visual-Web-Developer 10 and open my old asp.net 3.5 solution in it and converted it to asp.net 4 solution. every thing is working fine exept one strange problem: suddenly all chars like: ' or " in header script code become: &#39; or &quot; and this making all my javascript do not work and give error in all my solut...

Property 'CommandArgument' is WriteOnly

I have the following line in my code, inside the click event handler of an ImageButton: Protected Sub FinaliseBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles FinaliseBtn.Click, SubmitPaymentViaChequeBtn.Click Dim str as String = sender.commandargument.ToString.ToLower End Sub Both Controls are ImageButton's. ...

When are declared values bound to properties of a user control in WebForms?

When are declared values bound to properties of a user control in WebForms? I have a user control which has a public property which is an enum type. In my aspx page I'm setting it's value declaratively. In the ascx I'm outputting the value to the page using <%= %> syntax. The value that is output by the echo syntax is always zero 0. The...

Where / How get Training kits & MOCs for 50392A (Complete ASP.NET 3.5)

Hi all , I just wondering where to get the training kits and MOCs for the course 50392A (Complete ASP.NET 3.5) I searched a lot but nothing .. I also tried to search for courses with the same material but nothing too . Please recommend place where i can download the MOC from Or Recommend another courses with the same content , even i...

Utility or opensource to implement Routing and Url-Rewritting in asp.net 3.5

Hello Experts, I need to implement Routing or Url-Rewriting in my application. So, is there any utility like logging utility Elmah. I dont want to write much code, I need to configure and start playing. Any help will be most appreciated. ...