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

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

how to add html inside a asp.net list item

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :ASP.Net
Hello there,I was working with asp.net list item. There came a situation when I need to add html inside the listitem. But its causing compile error and saying html inside the listitem is not allowed. How overcome this situation? Anybody got any alternative solution for that. if yes, please show me an example. thx in advance

View Complete Post

More Related Resource Links

Databound dropdown list inside detailsview filtered dependent on selected radiobuttonlist item


It's driving me mad.  I have a detailsview bound to an sqldatasource. One of the items on the data table is to get its value from a dropdown list, so I created a template field and entered a dropdownlist, then bound that to a second datasource with the selection values in it. As the values can be male or female related, I have an unbound radiobuttonlist above the dropdownlist with two values - male or female - retunring an d"m" or an "f" and I want to use this to filter the records coming from the second data source for the dropdownlist.

I can't use a normal SQL control parameter on the datasource as the selector (the male/female radiobuttons) are in the detailsview and therefore "invisible".  I set up a normal control parameter with "none" as the type.  I then set the "autopostback" value to "true" for the male/female radio buttons and tried writing in the code-behind for the "maleorfemale_SelectedIndexChanged" event and using debug lines revealed that I was getting the "m" or "f" I needed by using "findcontrol", so that's fine.

I also tried adding in the "selecting" event for the second datasource to use the value of the radiobutton item, but although the "selecting" event fires

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

Embed Youtube inside Ajax Html Editor- problem



When inserting a simple embed of youtube inside the ajax editor, on firefox and chrome problems occur. On the other hand on internet explorer 8 everything works fine. I found this solution http://www.nopcommerce.com/boards/t/4228/bug-in-ajax-html-editor.aspx . 

My question is where do I find the DesignPanel.pre.js ?


Roderick Vella

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?

Using Dynamic Property inside Html Helper with Razor fires an error



I have the following with Razor:

@Html.GoogleAjax(View.GoogleAjaxKey, new String[,] { { "jquery", "1.4.2" } })

And the I get a strange error:

  'System.Web.Mvc.HtmlHelper<object>' has no applicable method named 'GoogleAjax' but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax.

What is strange is that it works fine using:

@Html.GoogleAjax("123", new String[,] { { "jquery", "1.4.2" } })

I tried the following code line:


And the key is displayed just fine so the problem is how I use the value of @View.GoogleAjaxKey into Html.GoogleAjax.

Do I need to change something on my Html Helper? Here it is:

    public static MvcHtmlString GoogleAjax(this HtmlHelper helper, String key, String[,] libraries) {


Attach Workflow to Task List, don't get option to manually start workflow via dropdown on task item



I am running WSS 3.0 with other workflows which are functioning correctly.  I created a new workflow in Visual Studio 2008 and was able to successfully run it in my dev environment.  I attached the workflow to a task list in my dev environment and was able to manually start the workflow by using the drop down workflow option and using the menus to manually start it.  I installed this workflow in our production environment and attached it to the task list (which had a SPD workflow attached to it which stopped working about a month ago).  I made sure that the option to manually start the workflow was checked.  When I tried to manually start the workflow, (hover mouse over title, drop down) there isn’t a workflow option.  The workflow also will not start automatically when a task is changed.


I attached this same workflow to a different task list in production and get the option to start it.


I have tried creating a small workflow in SPD 2007 and attaching it to the task list.  It shows that it is attached, when I look at the workflows that are attached to the task list, but I still don’t get the option to manually start it.


I have checked my security and I have fu

Workflow Task And Relevant List Item


Hello there...

1. What is the name of  the field thats connect between the task item and  the list name or guid and the list item id or guid

2. SPD: how can when starting the workflow how can i ensure that the initial form variables will be saved at the workflow task list

Many Thanks



Assigning users when creating a list item in a workflow


I'm using a workflow to assign tasks to users.  When I try to assign the task to a group (set in the workflow designer), the workflow gives me an error.  When I change the assign to property to a single user, the workflow works perfectly.  How do I get the workflow to assign the task to the group?  Or if that's not possible, can I get it to assign it to more than one user?


KPI to calculate list item clicked most ?


Hello All:

Is there anyway where we can use KPI list to attach to a SharePoint list and indicates which item was clicked the most ? Or any other way to find out the best 5 links based on how many times they were accessed by a user?


Thanks in advance

SharePoint Developer

Concurrent update in sharepoint list item



How the concurrent for sharepoint list item are are handled.

if two or more users are working on same item. Then how sharepoint process multiple update request for particular list item.

Send HTML email with banner inside


Hi all,

I want to send html emails with one promo-banner inside. Have a look at my code... I try but with no success.


            Dim strFrom, strTo, strSubject, strBody As String
            Dim myMessage As MailMessage
            Dim mySmtpClient As SmtpClient
            strFrom = "SENDER<test@example.com>"
            strTo = Session("eemaill")
            strSubject = "HELLO THERE!"
            strBody = "HELLO THIS IS MY MSG<br />" + _
            " <script type='text/javascript'> var ai = 899; var rc = 40; var rt= 2; var rc_width = 724; var rc_height = 90; </script>" + _
            " <script type='text/javascript' src='http://assets.example.com/s/ads.js'></script><br /><br />" + _
            "<b>THANK YOU</b>"
            myMessage = New MailMessage(strFrom, strTo, strSubject, strBody)
            myMessage.IsBodyHtml = True
            mySmtpClient = New SmtpClient("mail.example.com")




Thank you

link from one list item to another item in the same list?


I have a list in which it is possible for one item to be related to another list item in the same list.  I am trying make a column in the list which would contain a hyperlink to the related list item.  The primary column is called Bill Number, and the secondary column is Companion Bill Number .  The Companion Bill Number is the one I want to be a hyperlink to the list time in which that number is the primary Bill Number.  (hope that made sense!). 

I thought I could create a hypertext link out of the Companion Bill Number dynamically in a workflow action that runs on item creation.  I tried this by using the string builder to create a string for the hypertext link that I set to a workflow variable.  It looks like this  <a href="listURL.aspx?ID=[%Bill:CompanionBill%]">[%Bill:CompanionBill%].  Then in another action in the same workflow I tried to set the CompanionBill column to the variable value. 

What I ended up with was, instead of the number as a hyperlink, the text in the column reads as [%Bill:CompanionBill%].  I'm thinking this is failing because of the workflow process doesn't have the value of CompanionBill at the time I am asking it to set the variable value.

Any ideas on how I might make this dynamic link creation work?

When editing a list item the fields are not blank.


This is a recent issue that I have in which I have a "Issue Tracking" List that maintains the workflow of contract renewals.

When an person goes to edit an existing list entry, the description field (standard) has the original text in the box. Prior to this the original - or any older text from a prior change was listed outside and just below the box - and non editable.

That's not the case anylonger.

Any thoughts?



Video: Field and List Item Validation in SharePoint 2010

SharePoint supports the ability to create Excel-like field validation formulas to validate field data in a list, which greatly reduces the amount of custom code that a developer must create and deploy. (Length: 1:44)

How to Set a list item's createdby or modifiedby field as a User(deleted from AD)



I have to migrate data from SQL DB to SP list. But its old data and some users who created/modified the record has been deleted from the AD. Now I need to set the CreatedBy / ModifiedBy Field of the item accordingly. How to achieve this?

And when I tried to modify the "Editor" and "Author" field through Object Model, it works. But its not working through Webservice. What is the reason behind this?

Please help me find an optimal solution for this...


Thanks and Regards,

/* John JB */

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....

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