i am kinda new into asp.internet and so i take some help.

i've this type, the information is saved inside a SQL db using Linq.

my real question is, how do i give a column, which will have all the details concerning the sender, meaning Ip, browser, referrer etc.

the truth is is i wish to store it in a single area.

i originate from a php understanding that's been lengthy forgotten by me, however i still remember there is some serialize command, you could operate on an assortment and store it inside a db, then when you wish it to an assortment you'd just run deserialize command also it would return to an assortment.

what exactly everyone think the easiest way of preforming this course of action is?

Thanks ahead of time!

Assemble the information in almost any serialized form yourself and save it towards the DB column. One of the ways would be to use xml format

var sb = new StringBuilder();

sb.Append("<userdata>");
sb.Append("<browser>").Append(Request.Browser.Browser).Append("</browser>");
sb.Append("<ipaddress>").Append(Request.UserHostAddress).Append("</ipaddress>");
sb.Append("<referrer>").Append(Request.UrlReferrer.AbsoluteUri).Append("</referrer>");
sb.Append("</userdata>");

string SenderData = sb.ToString();
// Save the SenderData string to a varchar DB column.

// The above code only proposes the serialization idea.
// As commented, it doesn't encode the user values.
// One of the way to take care of that could be using XmlTextWriter.

var sb = new StringBuilder();

var xtw = new XmlTextWriter(new StringWriter(sb));

xtw.WriteStartElement("userdata");
xtw.WriteElementString("browser", Request.Browser.Browser);
xtw.WriteElementString("ipaddress", Request.UserHostAddress);
xtw.WriteElementString("referrer", Request.UrlReferrer.AbsoluteUri);
xtw.WriteEndElement();

xtw.Close();

string SenderData = sb.ToString();
// Save the SenderData string to a varchar DB column.

// Another suggested way

public class UserData
{
    public string Browser { get; set; }
    public string IPAddress { get; set; }
    public string Referrer { get; set; }

    public UserData()
    {
    }

    public UserData(string browser, string iPAddress, string referrer)
    {
        Browser = browser;
        IPAddress = iPAddress;
        Referrer = referrer;
    }
}

var userData = new UserData(Request.Browser.Browser, Request.UserHostAddress, Request.UrlReferrer.AbsoluteUri);

var xmls = new System.Xml.Serialization.XmlSerializer(typeof(UserData));
var sb = new StringBuilder();
var xtw = new XmlTextWriter(new StringWriter(sb));

xmls.Serialize(xtw, userData);

xtw.Close();

string SenderData = sb.ToString();
// Save the SenderData string to a varchar DB column.