asp.net

Unmask textbox password with Javascrip or jQuery

I have a textbox for user to enter positive integer. User enters a lot of entires many time. Overtime, textbox has list of previous entries, when you start typing something similar to previous entry. Sometimes, user accidentally select those previous entries. I know this one of browser's features. Is there anyway to clear these prev...

How can I serialize an object in Javascript, then deserialize it in asp.net?

I have a custom Javascript object that has a few string and float members. I'd like to serialize an array of them in Javascript, assign the result to a hidden field, and then retrieve and deserialize them in the codebehind for my asp.net application. Is there a standard way to do this? ...

how to set webservice url properly ?

I have a ASP.NET application. Inside the asp.net application I have a folder called WebServices where I keep all the .asmx files. I am referring these asmx files inside asp.net .cs files. Instead of giving the full url to the webservice.url property how can i set the path like this. ds.Url = this.ResolveUrl("~/WebServices/xxx.asmx")...

In Chrome browser, Modal pop up pops up when clicking a button which is disabled

I have a page which has a modal pop up which shows on clicking a link button. I have disabled the link button but on clicking the disabled link button also the modal pop up appears. It works fine in all other browsers except Chrome. How to prevent modal pop up from being shown when the link button(target control) is disabled? The code i...

How to deploy a web service in asp.net and add it as a web reference in another asp.net application

Hi, I have an asp.net web application and another web service application. I want to deploy the webservice asp.net application and to add it as the web reference in the asp.net web site. please tell me how to achieve this. Thanks Rupa ...

Fix broken element that miss ending tag or /> with c#

Is there a simple way to fix elements in a html document that miss the ending tag, or /> ending? I'm using ASP.NET with c# (loads html with the help of Html Agility Pack). An example: <img src="www.example.com/image.jpg"> should transform into <img src="www.example.com/image.jpg" /> or <img src="www.example.com/image.jpg"><...

set focus on textbox popup asp.net

Hi, How can i set focus on the first textbox control in a popup (modal)? It's a login window. I tried javascript, but that failed. ...

ASP.NET DataGrid - How to access column count prior to rendering?

Hi, I have a datagrid with columns programatically populated. I need access to the columns to modify the sort expression prior to render, but the column count is 0 at every stage I try to access them. Break points are hit, but each check of the count = 0. Have tried the following, accessing in various stages of the page / control life ...

Gridview updates within an Updatepanel.

What is the best way, using ASP.NET and C#, to tackle the following problem? I have a database containing a companies table, product table (each company has multiple products, though the tables aren't linked), and a details table. What I'd like is to display the companies table. Selecting a company reveals the products table for that c...

How to pass an additional parameter to CascadingDropDown ServiceMethod?

Hi. I have two chained CascadingDropDowns. Both are working fine. The thing is that in the underlying web methods which are supplying values for DropDwonList I need read one additional parameter. This parameter is needed for setting up the default item for dropdownlist. I do not know how to pass that parameter or read it. I've read on t...

Clustered search results for .net app on Win '03 / '08

hey all, i'm building a .net app using ASP.net 3.5 on win '03 or '08 (not sure yet) using SQL Server 2008. A major part of the app is building a powerful search function which has to cluster search results similar to this site. e.g. search for blindness and you see a cluster of results for blindness but also for visually impaired, eye...

Creating a many to many editor for ASP.Net using Entity Framework 1.0

I'm moving a bunch of code to Entity Framework and I need to represent a many to many link visually. This is done by a list of checkboxes with some of them checked to represent the join table. I've looked at Dynamic Data and while that works well, I can't see how to extract their ManyToMany_Edit.ascx file and use it in ASP.Net. Another ...

fixed gridview size with images asp.net

I have a GridView with an ImageField and a ButtonField in it. The Image is large .. but i want it to be displayed in a smaller size in the grid.. so I'm looking for a way to fix the cell size of my GridView. How can I do this? ...

Delay function of jquery to load ?

I want to delay blocking by 2 seconds while executing this code. How can I do that ? I tried setTimeout but it did not worked. document.getElementById('<%=btnSave.ClientID%>').disabled=true; document.getElementById('<%=btnSave.ClientID%>').value='Saving...'; $('#Block').block({message:'Please wait...',css: { border: '3px solid #a00' }})...

iTemplate what is it and place where i can get GOOD example in c#

HI , I am currently trying to learn more about custom controls and how to use them etc. i have come across iTemplate interface and was hoping that someone could better explain its use and point me toward a good example implementation. From what i have found it allows you to change how an asp.net control will display items. ive tried sea...

modify form to only display current user information, aspnet

hi, the current page code below lists profile information of all users within with my site. i'd like to modify it so that it only displays information about the current user logged in. Thanks. ----------aspx page---------- <%@ Page Language="C#" %> <%@ Import Namespace="System.Web.Security" %> MembershipUserCollection ...

ASP.NET HyperLink instead of LinkButton - how to avoid border around image??

I have an ASP.NET web site which contains some ImageButton controls that cause postbacks used to filter a list of products to certain groups of products. The ImageButton was created something like this: ImageButton _myImageButton = new ImageButton(); _myImageButton.ImageUrl = PicturePath + PictureName; _myImageButton.Attributes.Add("bo...

Create custom panel control with ASP.NET

A Server based control is not good solution for me, since my panel should by default always contain a asp checkbox which will allow the user to hide and show the panels content. I created my Panel as a templated user control but now I have the problem that I cannot declare variables in it. [ParseChildren(true)] public partial c...

ASP.NET AdRotator AdvertisementFile xml file from outside the application

Hello, I have an ASP.NET web site, let's call it MySite, and at the same level as the web site, a virtual folder - Data. And in that folder I have the xml file needed in an AdRotator control. I put "http://localhost/Data/Ads.xml" in AdvertisementFile and I get this error: 'http://localhost/Data/Ads.xml' is not a valid virtual path. I...

One DataSource with two tables for two grids

I calculate (Create from some queries) first table in my DataSource Select method then I need to make some basic calculation (statistics of first table, like summ for columns) with this table and create second table for second Grid, so how can I provide single calculation for two Grids ? Thank you. ...