.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 get related SPList by Hyperlink?

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :SharePoint


is there a method to get the list which belongs to a sharepoint hyperlink?

As Example:

Hyperlink: http://wum129109/Lists/Tasks/AllItems.aspx

return Object SPList with Url="Lists/Tasks"


I have a list with hyperlinks (pointing on sharepoint lists and items) and need to get the related object files.


What is a good practice to do this?


Good regards


View Complete Post

More Related Resource Links

Display Related Data in an ASP.NET GridView

Typically when you display a datagrid you will want to show data from a related table. There are 3 different ways to accomplish this with NetTiers. You can use a custom stored procedure, deepload functionality from the code behind, or a strongly typed datasource control. We'll provide an example of each

Restrict Hyperlink


Hello All Experts,

I have made one matrix report, in which i have taken one column group named as "Branch".
It will display dynamically all the branches. Now in that column group i have added two sub column
as "PO", "SO". In column "PO" i have given link of anther report with the paramtere also.

Now there is a hyperlink in PO column which is display for all the branches, i want that the hyperlink should be there for only branch name "AHD", for other branches there should not be any hyperlink to go another report.

Is this possible? if yes then how can we do this?


How to display related tables in one crystal report and how to link this report with combobox?


Hi! I want to display a crystal report in my vb.net application. Suppose I have tables named student details, student marks, student address, etc... Now if I want to display all these details (fields of all tables) in one crystal report (with page breaks if necessary) then how will I achieve it. I will be providing a combo box in my application that contains list of student names. How can I link this combo box with the cystal report to dynamically display report for different student on selected index change of combo box? Help me friends. An example would be appreciable.

search multiple words into textbox and populate all records in gridview related those keywords


I have a textbox and a gridview which is bound to a table

what I want to achieve is a solution where lets say there are two records - e.g. "1. Book and 2. Red", i want a user to type in those words and the gridview shows the results as followed;

1. Book

2. Red

I have set up the sql data source and everything and my like operator is this...

LIKE '%' + @record + '%'

how can I solve this problem?

How To display image in GridView as hyperlink


Hello Everyone 

Could someone please help me with a little issue....

I was able to save the image in the database as binary....... but now i don´t know how to display it in the GridView as a hyperlink.

I´ve read something about ImageField..... I´d appreciate any help .


SqlDataAdapter.Update related tables



I would like to get 2 related tables from SQL Server to DataSet, insert new rows and save them back to SQL Db.

Let's say i have 2 related tables as shown below...

Table1 Table2
test1ID (Primary Key) test2ID (Primary Key)
data test1ID


In Sql i have Diagram with relationship and Update Rule is set to Cascade

I am trying to get them to dataset, insert "master" and "child" row and save them back to db.

I tried different approaches (none of them workes) and this is one of them:

Dim ds As New DataSet()
        Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("NastanitveConnectionString").ConnectionString)
        Dim sql As String = "SELECT * from Table1;Select * from Table2;"
        Dim d

SharePoint Workflow E-mail Hyperlink has the Spaces Between Two Words Are Removed

I have a very simple Workflow, that includes href link to Infopath form.
If the form name includes spaces, the URL redirects to a The Form has been Closed message, indicating that it cant find that form.
In our scenario, the file name of the document/form in SharePoint when saved is called "Travel Request - <submit date>"  as noted with spaces.
The Hyperlink URL in the email generated by the workflow appears to encode all values in the name after the first two words (after Request).  See below.  after the word Request the spaces are encoded properly.     its replacing the first space with it appears %0d%0a (CR LF)
The URL below is what is displayed when right clicking, and selecting Edit Hyperlink in the email

I can reproduce this in development and production.  Any ideas on how this can be resolved?

Label can be seen but not the hyperlink over this background image



I have a panel like this. I have an image control inside this panel that I have put as a background image for the panel using the style where I adjusting the z-indexes.

This works fine!

I have put a label and a hyperlink like this in the <table>. The label can be seen but not the hyperlink which is the problem. I have tried to put a z-index to the hyperlink but that does not help.

How is it possible to see the hyperlink here also ? Thanks!


            top: 0px;
            left: 0px;

.stretch2 img
    position: absolute;
            top: 0px;
            left: 0px;

.stretch2 span
    z-index: 100;
    font-size: 1.2em;
    color: #ffff66;
    font-family: Arial, 'Microsoft Sans Serif';
            top: 0px;
            left: 3px;

<asp:Panel ID="Panel6" CssClass="stretch2"  runat="server" Width="100%">
    <asp:Image ID="Image16" runat="server" AlternateText="" ImageUrl="~/images/setImage.jpg" 
        ForeColor="Black" />

    <table style

How to use display Text in Hyperlink For SharePoint 2010 Designer Workflow


In SharePoint 2007 Designer, I have used the Hyperlink column to store the link "http://www.sharepoint.com/Default.aspx, Details". The details text will be shown in the Hyperlink column. Everything works fine in sharepoint 2007 Designer workflow.

In SharePoint Designer 2010 Workflow, I used the same method but the hyperlink column is displaying the full text "http://www.sharepoint.com/Default.aspx, Details" instead of only Details


SPList.Forms collection crashed, missing NewForm and EditForm



I accidently deleted the NewForm.aspx and the EditForm.aspx. This causes the Sharepoint server to remove the binding from the list to the forms. I read a lot about this problem and that many people are having problems with that.

The SPList object of my list contains a collection named Forms which should contain a List of the 3 forms (Disp, Edit, New). This collection now only contains 1 item(this must be the dispform item). How can I add the other items to this list programmatically?

Thanks for answers!

OnPreRender Event in SPList.



I try to make a custom list (list definition) and I want to add items when page will reload. Is any way to do it (I've tried a eventReceiver but it hasn't OnPreRender Event)

I'm sorry for my English.

HyperLink use to send request parameter to another page


The statement is correct:

<asp:HyperLink ID="HyperLink2" runat="server" Text

How do I modify the link of a Hyperlink column ?


OK , I'm a bit new to this game. I'm trying to build a web page that simply scans a directory in the server and creates a web page with links to the files in that directory - sounds simple and should be easy to do !

So I have a bit of code that reads the myDocuments folder in my web site and then populates a grid view hyperlink column with the filenames in the folder - wow it works !

The only thing I am struggling with now is getting the hyperlink correct within the GridView so that the user goes to the actual document.

So my code behind is;

Dim dirInfo As New System.IO.DirectoryInfo(Server.MapPath("~/MyDocuments"))  
       articleList.DataSource = dirInfo.GetFiles()  

which reads the file info in the directory myDocuments and binds the info to a datasource.

So now I'm using that datasource to display the filenames in a gridview so that the user can click on a name and open the file.

OOPS related question



I am trying to use some 3rd party web service

for which i hv sample file which is writen in C# and same I am trying to rewrite in vb.net for implement

till last line I hv understood and implemented , but I am not able to understand last line in this code so pls help me to understand the last line of this code how to write same line in VB.net

AgentWS = new AgentWebRef.AgentWebServiceService();
EventWS = new EventWebRef.EventServiceService();

//The client application will receive a unique SessionId from the Agent
//Web Service upon issuing its first request. The application must
//return that SessionId cookie on every subsequent request to
//identify its session to the Agent Web Service. The application can
//easily accomplish this by simply assigning a new CookieContainer
//object to its Agent Web Service instance.

AgentWS.CookieContainer = new System.Net.CookieContainer();
Get User Info
m_Agent = new AgentWebRef.UDAgent();
m_Agent.ldapUserId = <UserId>; //UserId specified by user
AgentWebRef.UDInfo info = new AgentWebRef.UDInfo();
info.listType = 143; //GET_LOGIN_USER

AgentWebRef.User user = (AgentWebRef.User)AgentWS.getInfo(m_Agent,info);

Command - Hyperlink

Why does the command work when I use it in a button, but not in the hyperlink? They are both bound the same way and named the same...             <Border Grid.Column="0" Width="170"                     Background="WhiteSmoke" BorderBrush="Lightgray" BorderThickness="1" CornerRadius="5" SnapsToDevicePixels="True">             <TreeView>                <TreeViewItem Header="Provinces">                   <Button Content="Show All Provinces" Command="{Binding Path=Command_ShowAllProvinces}" />                                     <Hyperlink Command="{Binding Path=Command_ShowAllProvinces}">                      <TextBlock T

Hyperlink in ListView

Hi there,   How can I write an url in a Hyperlink from code as in Label1.Text="My Text";   I would like to be able to do something like string MyLink; MyLink="myurl.aspx"; ListView1.FindControl("HyperLink1").Url=MyLink;   Thanks in advance    

How to update Sql Server related tables from Dataset(SchemaFill)

Hi!I would like to update new records that get inserted in DataSet to Sql Server Database.Below is a working example of how to do this if you use "DataAdapter.Fill(ds)". But i don't want to fill data, becouse i don't need data, i only need shema (I will use this dataset to insert new data to Sql), so i would like to use "DataAdapter.FillSchema(ds)"Please help me out at least with this one... i'm stuck... can't continue untill i crack this nut.<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <table> <tr> <td> <asp:GridView ID="GridView1" runat="server" ShowHeaderWhenEmpty="True"> <Columns> <asp:CommandField ShowSelectButton="True" /> </Columns>
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