Click here to Skip to main content
15,887,812 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Write text file problem [modified] Pin
cheeken2u19-Nov-06 2:53
cheeken2u19-Nov-06 2:53 
GeneralRe: Write text file problem Pin
Justin.Jones19-Nov-06 17:54
Justin.Jones19-Nov-06 17:54 
QuestionProblem in migration from vs.net 2003 to vs.net 2005 Pin
Thampi18-Nov-06 6:09
Thampi18-Nov-06 6:09 
AnswerRe: Problem in migration from vs.net 2003 to vs.net 2005 Pin
WillemM18-Nov-06 7:58
WillemM18-Nov-06 7:58 
QuestionHow to dynamic bind Listbox DataSource? Pin
Old Gun18-Nov-06 3:54
Old Gun18-Nov-06 3:54 
QuestionRe: How to dynamic bind Listbox DataSource? Pin
just3ala218-Nov-06 19:54
just3ala218-Nov-06 19:54 
AnswerRe: How to dynamic bind Listbox DataSource? Pin
Waseem_Kanafani18-Nov-06 22:25
Waseem_Kanafani18-Nov-06 22:25 
GeneralRe: How to dynamic bind Listbox DataSource? Pin
Old Gun19-Nov-06 17:28
Old Gun19-Nov-06 17:28 
I test your tips, it still does not work,my code is here.

<br />
<br />
using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Data.OleDb;<br />
using System.Drawing;<br />
using System.Web;<br />
using System.Web.SessionState;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.HtmlControls;<br />
using WinPbMove;<br />
namespace WebPbMove<br />
{<br />
	/// <summary><br />
	/// </summary><br />
	public class WebProdSelect : MetaBuilders.WebControls.DialogPage<br />
	{<br />
		protected System.Web.UI.WebControls.TextBox TextBox1;<br />
		protected System.Web.UI.WebControls.Label Label1;<br />
		protected System.Web.UI.WebControls.ListBox ListBox1;<br />
		protected System.Web.UI.WebControls.Button cmdFilter;<br />
		protected System.Web.UI.WebControls.Button cmdReturn;<br />
		private PbMove dl = null;<br />
		const string MYSTRING = "-------";<br />
	<br />
		private void Page_Load(object sender, System.EventArgs e)<br />
		{<br />
			string strSQL = "";<br />
			if (!Page.IsPostBack)<br />
			{<br />
				if (dl == null)<br />
					dl = new PbMove();<br />
				if (dl.OpenConnection() == false)<br />
					throw(new SystemException("Connect Oracle Failed!"));<br />
				OleDbConnection cn = dl.Connection;<br />
				<br />
				if (TextBox1.Text == "")<br />
				{<br />
					strSQL = "Select t.prdct_name || '" + MYSTRING + "' || t.dscr From ip_prdct t";<br />
				}<br />
				else<br />
				{<br />
					//TextBox1.Text = Session["UserFilterString"].ToString();<br />
					strSQL = "Select t.prdct_name || '" + MYSTRING + "' || t.dscr From ip_prdct t"<br />
						+ " Where t.dscr like '%" + TextBox1.Text + "%'";<br />
				}<br />
				OleDbDataAdapter adpter = new OleDbDataAdapter(strSQL,cn);<br />
				DataSet ds = new DataSet();<br />
				adpter.Fill(ds,"IP_PRDCT");<br />
				DataTable dtProdct = ds.Tables["IP_PRDCT"];<br />
				ListBox1.DataSource = dtProdct;<br />
				ListBox1.DataTextField = dtProdct.Columns[0].ColumnName;<br />
				ListBox1.DataValueField = dtProdct.Columns[0].ColumnName;<br />
				ListBox1.DataBind();<br />
			}<br />
		}<br />
<br />
		#region Web <br />
		override protected void OnInit(EventArgs e)<br />
		{<br />
			//<br />
			//<br />
			InitializeComponent();<br />
			base.OnInit(e);<br />
		}<br />
		<br />
		/// <summary><br />
		/// </summary><br />
		private void InitializeComponent()<br />
		{    <br />
			this.cmdFilter.Click += new System.EventHandler(this.cmdFilter_Click);<br />
			this.cmdReturn.Click += new System.EventHandler(this.cmdReturn_Click);<br />
			this.Load += new System.EventHandler(this.Page_Load);<br />
<br />
		}<br />
		#endregion<br />
<br />
		private void cmdFilter_Click(object sender, System.EventArgs e)<br />
		{			<br />
			if (dl == null)<br />
				dl = new PbMove();<br />
			if (dl.OpenConnection() == false)<br />
				throw(new SystemException("Connect Oracle Failed!"));<br />
			OleDbConnection cn = dl.Connection;<br />
				<br />
			string strSQL = "Select t.prdct_name || '" + MYSTRING + "' || t.dscr From ip_prdct t"<br />
				+ " Where t.dscr like '%" + TextBox1.Text + "%'";<br />
			OleDbDataAdapter adpter = new OleDbDataAdapter(strSQL,cn);<br />
			DataSet ds = new DataSet();<br />
			adpter.Fill(ds,"IP_PRDCT");<br />
			DataTable dtProdct = ds.Tables["IP_PRDCT"];<br />
			ListBox1.DataSource = dtProdct;<br />
			ListBox1.DataTextField = dtProdct.Columns[0].ColumnName;<br />
			ListBox1.DataValueField = dtProdct.Columns[0].ColumnName;<br />
			ListBox1.DataBind();<br />
		}<br />
<br />
		private void cmdReturn_Click(object sender, System.EventArgs e)<br />
		{<br />
			string sRet = "";<br />
			string str = ListBox1.SelectedItem.Text;<br />
			int i = str.IndexOf(MYSTRING);<br />
			if (i != -1)<br />
				sRet = str.Substring(0,i).Trim();<br />
			this.Close(sRet);		<br />
		}<br />
	}<br />
}<br />
<br />

Questionhow can i call out values from .aspc Pin
suju3118-Nov-06 1:42
suju3118-Nov-06 1:42 
QuestionRe: how can i call out values from .aspc Pin
just3ala218-Nov-06 19:56
just3ala218-Nov-06 19:56 
Questioncreating png/images from pdf file Pin
Samir NIGAM17-Nov-06 23:47
Samir NIGAM17-Nov-06 23:47 
Questionnavigating to the respective resources while clicking on the image present in the template column Pin
yuvachandra17-Nov-06 23:42
yuvachandra17-Nov-06 23:42 
QuestionHTML page inside tablecell.. Pin
KORCARI17-Nov-06 23:30
KORCARI17-Nov-06 23:30 
AnswerRe: HTML page inside tablecell.. Pin
Guffa18-Nov-06 1:35
Guffa18-Nov-06 1:35 
AnswerRe: HTML page inside tablecell.. Pin
iamrashida8319-Nov-06 1:14
iamrashida8319-Nov-06 1:14 
QuestionError sending mails Pin
abulhassan_shock17-Nov-06 22:42
abulhassan_shock17-Nov-06 22:42 
AnswerRe: Error sending mails Pin
coolestCoder18-Nov-06 22:34
coolestCoder18-Nov-06 22:34 
Questionjavascript........... Pin
hai2muru17-Nov-06 20:46
hai2muru17-Nov-06 20:46 
AnswerRe: javascript........... Pin
Guffa18-Nov-06 1:33
Guffa18-Nov-06 1:33 
Questionhow to fix Accordion problem ??? Pin
amin_behzadi17-Nov-06 20:45
professionalamin_behzadi17-Nov-06 20:45 
AnswerRe: how to fix Accordion problem ??? Pin
ayeleteric19-Nov-06 1:18
ayeleteric19-Nov-06 1:18 
QuestionEditing web.config while deploying Pin
Nicejith17-Nov-06 20:20
Nicejith17-Nov-06 20:20 
QuestionHow to add Color Dialog in the asp.net page? Pin
param thaker17-Nov-06 20:13
param thaker17-Nov-06 20:13 
QuestionDirectory Uploading Pin
sukhchain singh17-Nov-06 19:50
sukhchain singh17-Nov-06 19:50 
QuestionHelp About FTP Pin
Deepak the Cool17-Nov-06 19:38
Deepak the Cool17-Nov-06 19:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.