.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

link css with individual control

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net

I have a css sheet for menu control. The menu needs to be put in aspx page under the <asp:content> control. I need to know how to link this css sheet with my menu control.


View Complete Post

More Related Resource Links

video tutorial link for composite and rendered custom server control


hii all

i am new to technology so go easy on this post

according to what i read from web there are 3 type of custom server controls

1 superclass

2 composite

3 rendered

i found video tutorial for superclass custom server control but couldnt find video tutials for other 2.

please forward me link for composite and rendered custom server controls video tutorial  

How to populate a link on a Label control?


I have a requirement where I need to place a link inside a label. I am giving the method below for your reference.

  public override void PopulateDataUI(Object o)
              CustomerInvoice data = o as CustomerInvoice;

              CIPI_InvoiceNumber.Text = data.InvoiceNumber.ToString();

            //I have written as below but it's not working.    

            //LinkLabel lnk = new LinkLabel();
           // lnk.Text = data.InvoiceNumber;
           // CIPI_CustomerName.Text = lnk.Text;


       NB:     CIPI_InvoiceNumber is the name of the Label I am using.


Can anybody please  suggest me a solution. I am working on C#.net 3.5 and my project is a Windows Application






Gridview Link Button control click event


Respected Reader,

I have  Web page that uses LinkButton control inside Template Fields of Gridview.

I am trying to work on LinkButton Click event and trying to preserve the Value of LinkButton that user click, and based on that value, i want to refresh tha page data.

I used CommandName and CommandArgument property of Linkbutton, but i can use that property only in GridView_RowCommand method by checking e.CommandName expression. But the problem with that Gridview_RowCommand event fire after all other page_load activity. So the value never used in the page_load event to refresh the data in all other control.

I also tried to use OnClick Method, Session variable and Hidden variable. but when i run Response.Redirect method from Gridview_RowCommand, it clear all the Session and Hidden variable values. also tried (Response.Redirect(,false)) method but never got success.

Any suggestion will be appricated in advance.

how to set onclick to link from menu control



I have a content page in which I have set a jsp page using <script> tag. I have created a function to open the page. I need to be able to click the different pages from the menu control.


<asp:Content ID="Content1" ContentPlaceHolderID="menu1" Runat="Server">

<script type="te

How to set a link in Calendar Control and retain text in the control?


Hi Community

    This is my first time in this forum.

    I have a Calendar Control that I added text that show scheduled meetings on certain dates and it works okay.
The problem is that when I click on a date I need to http to another web page or sometimes goto a web page in
the same web site.  The problem is  when the code that  creates the hyperlink runs it replaces the text displaying "meetings"
scheduled for that date instead appending the link to the date and retaining the "meetings" text that was already there.

fyi, e.Day.Date.Day matches any number entered.

Below is how I set that up with the code that adds the meetings followed by the url code that replaces the meetings text: 

public partial class _Default : System.Web.UI.Page


string[,] vholidays = new

adding a link like a control in toolbox


Hello all forum members,

I was getting tired of copying and pasting Lorem Ipsum text on my web page.

how can i made a Lorem Ipsum text script as link in tool box, so that, after th

Why two clicks on link control needed?


I have some links in aspx page that use javascript. They are shown on pages to users as text "+here+". Thing is, they need to be clicked twice to work and open the div section containing optional questions. I presume the first click gets focus to the control and a second triggers the event. But why is this? How can such controls be made to require only one click? Is there a better way to show/hide an optional form section, a way that needs only one click to show/hide?

In the scripts section is this:

<script type="text/javascript">
      function toggleDiv(divid) {
     if (document.getElementById(divid).style.display == 'none') {
       document.getElementById(divid).style.display = 'block';
     } else {
       document.getElementById(divid).style.display = 'none';
In the .aspx page is this:
<h3 style="background-color:Gray;color:white;font-weight:normal">Networking (Click <a style="color:white;size:8pt;font-weight:normal" href="javascript:;" onmousedown="toggleDiv('WANOpt');">+here+</a> to see or hide optional questions 6.8 to 6.11)</h3>
<div id="WANOpt" class='opt'><div class=

Link Button & DropDownList Control problem in BlackBerry



 I have an Mobile web application. In my application i have Link Button control and Drop Down list control. These controls are not working in BlackBerry devices. Does any come across this problem? Can you give me better solution for this?

Iam thinking to implement javascript for DropDownList control? is this the right way to overcome the problem.

I tested in BlackBerry Bold 9000 Device emulator.


Add Link in webbrowser control using VB NET


How to insert a link in webbrowser control without webBrowser1.Document.ExecCommand("CreateLink", True, Nothing).

I've tried to add with webBrowser1.Document.ExecCommand("CreateLink", False, "<a href='http://www.microsoft.com'>microsoft</a>"), but doesn't work.

Note: I don't have problem with:

webBrowser1.Document.ExecCommand("insertimage", True, Nothing)

webBrowser1.Document.ExecCommand("CreateLink", True, Nothing)

webBrowser1.Document.ExecCommand("EditMode", True, Nothing)

and others command

could you help me?



Can we disable the hyper link in a SharePoint tree view control


We have created a Tree view control for the ease of navigation. Is it possible to disable the hyperlink and keep the text only in the control.


I am not sure if this make any sense. Please see the below scenario


·         Site


Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Accessing the different controls inside a GridView control

how we can access a particular control which resides inside a GridView control. In this article I will show you how you can access different controls inside a GridView control. We will see how we can access a TextBox control, a DropDownList control and a ListBox control. If you are working with ASP.NET 1.X then you might want to check out my article Accessing Different Controls Inside a DataGrid.

In-Depth look at the GridView Control

In the last article we looked at few of the new controls available in Asp.net 2.0. We also talked about Grid View Control which has replaced the Asp.net 1.1 DataGrid control for good. In this article we will examine more features of the Grid View control. In this article we will see some of the common operations that can be performed using the GridView control. Apart from these operations there are many more functions that can be performed on the control and which we will see in the later articles

Edit GridView Individual Cells in ASP.NET

The ASP.NET GridView allows for a row of data to be edited by setting the EditIndex property of the GridView, placing the entire row in edit mode.

You may not want the entire row in edit mode if you are using DropDownList controls for several columns in the EditItemTemplate. If each DropDownList has many options then loading them all at once may result in a sluggish page. Also, if your data structure is more like a 2 dimensional array rather than a set of rows, you may want to edit each cell individually.

Here I will demonstrate how to achieve this and also how to deal with event validation without disabling it.

ASP.NET repeater control - databind with style

even used the inline editing features, which I at the time thought was the coolest way possible to write ASP.NET code ( I managed to write code to hide all other rows and only show the current one - the row being edited). With a nice looking EditTemplate it looked indeed very slick but it really turned into giant and hard to manage code behind files.

Creating Paging for a Repeater Control

A common question is "How do I implement paging within a Repeater?" Although the beauty of the Repeater control is its flexibility, you're on your own for building most functions. ASP.NET 2.0 has included some new controls that provide paging, as does the DataGrid in ASP.NET 1.1. However, this tip shows you how to roll your own paging for a simple data viewer.

Using TemplateFields in the GridView Control

The GridView is composed of a set of fields that indicate what properties from the DataSource are to be included in the rendered output along with how the data will be displayed. The simplest field type is the BoundField, which displays a data value as text. Other field types display the data using alternate HTML elements. The CheckBoxField, for example, renders as a checkbox whose checked state depends on the value of a specified data field; the ImageField renders an image whose image source is based upon a specified data field. Hyperlinks and buttons whose state depends on an underlying data field value can be rendered using the HyperLinkField and ButtonField field types.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend