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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem in item databount

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

Hi All,

am using vs 2005 with c#

in my pge i have one datalist

<asp:DataList id="dtListProducts" runat="server" OnItemDataBound="dtListProducts_ItemDataBound">
<AlternatingItemStyle BackColor="#F5F7F8"></AlternatingItemStyle>

<table><tr><td>Name : <%#Eval("prod_name")%></td></tr>

<tr><td>Code : <%#Eval("prod_code")%></td></tr>

<tr><td>Type : <%#Eval("prod_type")%></td></tr>



My Requirement is when the mouse overed on any of the products (in output  a borber has to be displayed)

I wrote the following code in Itemdatabound

protected void dtListProducts_ItemDataBound(object sender, DataListItemEventArgs e)

        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            e.Item.Attributes.Add("onmouseover", "this.style.border='1px solid

View Complete Post

More Related Resource Links

problem...i want a list item to populate all data in gridview!!!


i have a dropdownbox and a gridview

what I want is to have a list item which populates all data in a gridview.

I have tried using list item selected value=0 but to no avail.

what is the easiest way to achieve this?

c# form problem with list item


I've got a c# form containing a listbox how ever i cant get

listbox1.items.Selected      to work



neither work. both not giving me the option for .selected nor selectedvalue

how does this work on c# forms as it works the above way on webforms....

Problem Add Category Item by select department

Add Category Item by select department Firstly database has two tables Department and Category Department Table Id -------int  (PK) dep_name--------nvarchar(50) dep_description---------nvarchar(100) -------------------------------------------------------- Category Table Id------int cat_name------- nvarchar(50) cat_description----------- nvarchar(100) IsActive--------bit DepartmentId-----int   (FK) ---------------------------------------------------------- I have form contain DetailsView control under name CategoryDetailsView. My problem: this mechanism not duo correctly I don't know why,  only show to me when I run page" Procedure or function InsertCategory has too many arguments specified. " My idea when a user need to create category must on him write category details ( category name, Description, IsActive) and select this category where to insert by select department name from drop downlist This control connecting with table under name Category, insert process by stored procedure under name sp_InsertCategoryALTER Procedure [dbo].[InsertCategory] (@cat_name nvarchar(50) ,@cat_description nvarchar(100),@IsActive bit , @Result int output)AsBegin Insert Into Category (cat_name , cat_description, IsActive ) Values (@cat_name , @cat_description, @IsActive ) Select @Result = @@IdentityEnd <asp:DetailsView ID="CategoryDetailsView

No item exists at Url. It may be deleted or renamed by another user problem

Hello  all,   I am using strListUrl = subSite.Url + "/" + strSubstring + "DispForm.aspx?ID=" + listitem["ID"] for redirecting the user the list item. But it says the No item  exists at Url. It may be deleted or renamed by another user problem. After some research I came to know, I can't use ?ID=. from http://support.microsoft.com/kb/972225/en-us. Can anyone tell me, what the article is saying or Anyone has any solution.

Menu selected item formatting problem in mozilla

Hello, I have a problem with menu slected item. when i click on menu item it shold display in different color for that i hv wrote below code in my master page cs file. on page load.  string thispage = this.Page.AppRelativeVirtualPath; int slashpos = thispage.LastIndexOf('/');string pagename = thispage.Substring(slashpos + 1); string pagename = thispage.Substring(slashpos + 1); foreach (MenuItem mi in Menu7.Items) { if (mi.NavigateUrl.Contains(pagename)) mi.Selected = true; break; } this works fine in IE but when i run in firefox my page formatting disturbs means the content page not coming in a proper place. thanx in advance. do the needfull.         

WPF accordion item rendering problem

Hi, can any one guide  me that why WPF accordion item does not render properly in design view. I got this message NullReferenceException was thrown on "AccordionItem": Object reference not set to an instance of an object.

View : Tagged item Result : Tag cloud Problem

When you click on a tag in a webpart. It directs us to a new page for listing all the items associated with the Tag. In that page, there are two options to View the result - ALL and Popular within 60 days.

In ‘All’ tab it says - There are no available items tagged with 'keyword'
But on clicking ‘Popular within last 60 days’, it displays the items.
So why does it say 'no items tagged' in All tab.? Why the functioning of this all tab is different ?

Is there any way i can disable this All

Problem deploying custom report item. Items shows in preview screen in VS, but not in server deploye


I have developed a custom report item that works fine in design and preview mode while in Visual Studio. I cannot get it to show up on my deployed reports. Here's what I have done so far:

1. Deployed the report using Visual Studio

2. updated the rsreportserver.config file with the following entry:

      <ReportItem Name="PedigreeChart" Type="Uabr.Rap.PedigreeChart.PedigreeChartRenderer, Uabr.Rap.PedigreeChart" />

3. Updated the rssrvpolicy.config file with the following entry.

                    Description="This code group grants Uabr.Rap.PedigreeChart.dll FUllTrust permission. ">
                                Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\Uabr.Rap.PedigreeChart.dll" />

I've also tried using the StrongNameMembershipCondition

gridview item template Tab index and focus problem ???


Hi .... i have used the below gridview item template , which is working fine.

No Problem here.


I need to set Tab Index here.

1. I have a textbox outside of gridview , on pressing the tab from the textbox in need to focus on gridview item template first row.

2.After user click add new button, again i want to focus on the second row on the gridview item template first column.

Plz help me to do so ....

Workflow. Copy item to new list - problem updating additional fields in the new list record




I'm having a couple of problems


I have a list, List A. On a couple of triggers I want list A to copy fields to a new record in List B.

Many of the columns are the same Say, column1, column 2, colmn 3. The Copy Item is working fine.


I then want to amend several fields in the new record in List B to reflect the new info from list A, and create info in a fields (say ListBcolum4 type choice and ListBcolum5 single line).

For the life of me I cant get this to work... ive tried updating fields, creating items...

A pointer on how to do this would be greatfully received.

problem copying list item containing office 2007 files, fine with office 97-2003 format



I created 2 document libraries, with a few fields in it, one of it is the people and group field named "Approver".  The thing is, when the document is of 97 - 2003 format, the approver field gets copied over fine, but when is of 2007 format, it does not get copied, its only the people and group column, I tried different names like Hidden_Approver, but yet it does not get copied. Am I doing something wrong here, and have anyone else faced the same error

Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Regrading Sharpoint 2010 problem and solutions

We can write your question and problem on this blogger.you get ans.use.

This sharpoint 2010 problem solving threads

Hi friend,

you can use this thread to solving problem and solutions.

Virtual Path Problem


 I get the following error on last line below (working on remote host): 'E:\web\sfcascom\ls_admin/uploads/images/001.JPG' is not a valid virtual path,

Note that the slashes go in different directions

I've tried a number of things but nothing seems to work. Thanks-


Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Web.UI.WebControls

Imports System.Drawing.Imaging.ImageCodecInfo
Partial Class Protected_imageupload
    Inherits System.Web.UI.Page
    Private Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
        ' Initialize variables
        Dim sSavePath As String
        Dim sThumbExtension As String
        Dim intThumbWidth As Integer
        Dim intThumbHeight As Integer
        Dim sFilename As String = ""
        ' Set constant values
        'sSavePath = "images/"
        sSavePath = Server.MapPath("~/") + "ls_admin/uploads/images/"

        sThumbExtension = "_thumb"
        intThumbWidth = 160
        intThumbHeight = 120

        ' If file field isn?t empty
        If FilUpload.PostedFile IsNot Nothing Then
            ' Check file size (mustn?t be 0)
            Dim myFile As Http

Strange Photo upload problem


I'm working project it's live on shared hosting

we'er uploading photos to a file on the server everything works fine the photo is resized renamed and sent to the folder

the upload page returns the thumbnail and the full size photo it's there all the photos have to be approved by an admin

twice now after they have been approved they disapear I checked the folder they are not there could there be anywhere

on the server they could get hung up before they go into the folder I have it setup so when you delete the data base entry it deletes the photo from the folder othe than that you need to open the folder and delete the photo this has hapened twice now I tried to recreate it with no luck

thaks for your help in advance

ASP.Net Caching problem ??


I'm having a problem with an asp.net 3.0 application using a gridview to display data.  The problem seems to be that despite a brand new .selectCommand being sent to the sqlDataSource, the gridview starts displaying data from *someone else's* query.  For example, user A is logged in and will be working fine until a few page submissions later when the gridview data starts suddenly showing information that belongs to another user. 

This is my first asp.net application, though I've been working with classic asp and ADO for years so I'm used to sending a SQL string and getting back the results from that string.  Apparently there is a complex caching system which is interferring which I do not at all understand so at this point I just want to stop the server from caching any data whatsoever.  Is this possible?

Any and all help will be much appreciated!!

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