asp.net

Asp.Net weird name?

I know with ASP.Net 4.0 you can have ClientIDMode to static to have clean ID. Is there something to have "name" the same way? Example : <input type="text" name="_wizard$ctl00$CaptionName" id="captionName"> ...

how to convert .net web services into WCF?

Hello, Is there tool/way to conver webservices into WCF services? like .net frame work application 1.1 to 2.0 provided by MS visual studio. any help would be appritiated. Thanks, Pradeep ...

JQuery Ajax with multiple return values from ASP.NET

Hi, How can I return multiple values from JQuery.Ajax() in the success function ? I tried it: $.ajax({ type: "POST", url: "default.aspx/myFunction", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", suc...

How should I go about creating a user control with variable layout?

I have a user control which contains a number of child controls. I want to be able to change the layout of the control (i.e. change the markup surrounding the child controls) via a property of the user control, but I don't want to have to duplicate the child controls themselves. This precludes using, say, a MultiView with different versi...

How to connect to a third party website in classic asp using javascript for password encryption and yet not giving in the password.

Hi I have to make changes to classic asp website where once a button is clicked it autologins to a third party website with a intermediate page that warns that you are logging in to a third party website. The thirdparty is providing us with a username and password and gave us an examle javascript to encode the password to send to them...

Custom WebResource.axd implementation - rational or not?

Hello! We are about to move a bunch of static image and JS files into an assembly rather than hosting them as stand-alone files. Having in mind that WebResource.axd is the standard way of referencing them, would it be rational to create a custom resource handler for the following reasons: GZIP content when browser supports it Permanen...

Asp.net String filtering issues

I have two different asp.net web pages with gridviews. They both display numerical data as currency. One page displays the currency with the '£' symbol. Its code is as follows: <asp:Label ID="Total" runat="server" Text='<%# Eval("TotalCharges", "{0:lc}") %>'></asp:Label> The other page displays its data with a $. Here is its code:...

CS1061: 'page' does not contain a definition for 'BtnExportGrid_Click' and no extension method 'BtnExportGrid_Click'

Here is the Code for my Code Behind public partial class PIX_Report_by_PIX : System.Web.UI.Page { /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { } /// <summary> /// /// </summary> //...

NewtonSoft JSON, hidden field, escape chars

This is a little embarrassing question but here it goes. I have a hidden asp.net field that gets populated with a json string just before post back. I use JSON.stringify to set the value of the field like this function prepareForSave() { var commissionSplits = new Array; $("input[id$='ctlBidAgentId']").e...

How do I localize the validation messages in JQuery's Validation?

Is there a standard practice for localizing the JQuery Validation messages? I've been able to hack something together by declaring my own ClassRules and referencing them instead of the default ones. My code. <input class="localized-required" id="myTextInput" name="myTextInput" type="text" value="" /> <script language="javascript" typ...

Dynamically Added Event Handler Not Firing

Here is a quick code snippet, that doesn't seem to work at all for me. I'm reading from a file to create a list of radio buttons. The problem is that when one of the radio buttons is clicked the Event Handler I have set up in the code doesn't fire. I have tested it over and over in debug mode with line breaks... all with no luck. Am I mi...

Have to select gridview row twice for dropdown to select correctly

I'm using the code below to extract data from a gridview and populate it into textboxes for the days and two drop downs for Project and Category. For some rows in the gridview everything but the category ddl populates correctly. If I click the row a second time the category ddl displays the correct category. Can anyone tell me why I h...

Alternative to OverLibWrapper for displaying control tooltips in ASP.NET

I looked into a nice way to display tooltips dynamically and I found OverLibWrapper, which was exactly what I needed. I have all the tooltip data stored in a custom configuration section, the tooltips are bound to their respective controls during Page_Load. I did a quick test and worked fine. The problem came up when I realized that Ov...

ASP.NET security exception with OpenWebConfiguration on shared host

After moving my web site from my local development environment to a shared host I get: Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust leve...

List iteration taking so much time?

I have List (of class). having 1800 of count and each object has 90 properties. When I terate earch with 90 properties taking more and more time. How to resolve this Dim cellIntStyle As HSSFCellStyle = hssfworkbook.CreateCellStyle cellIntStyle.DataFormat = HSSFDataFormat.GetBuiltinFormat("#") Dim cellDateStyle As HSSFCellStyle = hss...

Configure endpoint for web service declared with WebService() attribute

We have a C# Web Service that declares itself using attributes. The code-behind file looks like: [WebService(Namespace = "http://the.web.service.url/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public sealed class TheWebservice : WebService { [WebMethod] public SomeObject TheFunction() ... The web ser...

How do I pass a variable using window.open()?

I would like to add some variables when my window.open function fires. Example: <a href="javascript:void(window.open('Details.aspx', 'Title'))"><%# Eval("Id").ToString) %></a> I would like to pass the id number to the Details.aspx page. How do I do that? ...

Parse jQuery serialized data in C#

I have a ListBox on my page. I'm making an AJAX call to a C# function, and I need to pass the values of the selected items. Here's what I have: $('#btnSubmit').click(function() { $.ajax({ type: "POST", url: 'Default.aspx/GetSelectedValues', data: '{selectedValues: ' + $('#lbItems').serialize() + '}', ...

Calculating relative time offset

I was reading this article about relative time calculation The problem is that the results are wrong due to the time offset. My webpage is Greek. So how should i modify that function to work correctly, including the GMT+2 or GMT+3 hours offset? ...

Why do I need to use .d to access data returned by jQuery AJAX?

I've put together some jQuery AJAX code using some tutorials I found on the internet. I'm new to jQuery and want to learn how to do things betters. I have a coworker who put together a beautiful web application using a lot of jQuery. The thing I'm most confused about here is: why is it necessary to use the ".d" when referring to the r...