hmm sometimes its necessary to send parameters to an url from a desktop application ..and here is the code to do that using httppost method….
code for class file
using System.IO;
using System.Web;
using System.Net;
using System.Collections.Specialized;
using System.Collections.Generic;
namespace Emri
{
class PostSubmit
{
public enum PostTypeEnum
{
/// <summary>
/// Does a get against the source.
/// </summary>
Get,
/// <summary>
/// Does a post against the source.
/// </summary>
Post
}
private string m_url [...]
Archive for March, 2009
httppost
Posted in Windows application httppost, tagged c#, httppost, Windows application on March 20, 2009 | Leave a Comment »
Datalist Paging
Posted in datalist paging, tagged asp.net, c#, datalist on March 16, 2009 | Leave a Comment »
hmm the code for datalist paging is as follows
public void binddata()
{
//uid = “dharma.sonu@gmail.com1″;
uid = Session["user"].ToString() + “1″;
qid = Request.QueryString["qid"].ToString();
string query = “select * from albumpics where userid=’” + uid + “‘ and albumname=’” + qid + “‘”;
SqlDataAdapter da = new SqlDataAdapter(query, con);
con.Close();
con.Open();
DataSet ds = new DataSet();
int startRecord = (int.Parse(CurrentPage.Value) – 1) *
int.Parse(PageSize.Value);
da.Fill(ds, startRecord, int.Parse(PageSize.Value), “albumpics”);
if [...]