|
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace Jquery_Asp.Net.App_Utilities
{
public class UiUtils
{
}
/// <summary>
/// Jquery Serializated Item
/// Author :Sreekumar
///CreatedDate :8/6/2010
/// </summary>
/// <returns>JQSeriazileItem</returns>
public class JQDeSeriazileItem
{
public string Name
{
get;
set;
}
public string Value
{
get;
set;
}
}
public class JQDeSeriazileProcess
{
JQDeSeriazileItem _item = new JQDeSeriazileItem();
public string StringParm
{
get;
set;
}
private string[] _strKeyValue;
public JQDeSeriazileProcess(string stringParm)
{
this.StringParm = stringParm;
_strKeyValue = StringParm.Split('&');
}
public JQDeSeriazileItem this[string Name]
{
get
{
if (StringParm == string.Empty)
return null;
JQDeSeriazileItem item = new JQDeSeriazileItem();
item.Name = Name;
string[] _str;
var strSelector = Array.Find(_strKeyValue, str => str.ToLower().StartsWith(Name.ToLower()));
if (strSelector == null)
{
item.Value = "";
}
else
{
_str = strSelector.Split('=');
item.Value = (_str[1] != null) ? _str[1] : "";
}
return item;
}
}
}
public class JQDeSeriazile
{
JQDeSeriazileProcess _item;
public JQDeSeriazile(string parms)
{
_item = new JQDeSeriazileProcess(HttpContext.Current.Server.UrlDecode(parms));
}
public JQDeSeriazileItem this[string Name]
{
get
{
return _item[Name];
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.