Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: my button is in a twilight zone


Message #1 by judyn@s... on Sun, 23 Mar 2003 18:19:24 -0800
I made this button, double clicked on it and in the code behind I put in Response.Write("working"):
Response.End(); so why does it reload a blank page with nothing in it?

Help!!!!!!!

Judy

 


Message #2 by irfan.syed@g... on Mon, 24 Mar 2003 10:36:59 +0800
Any other condition u put in there like IsPostBack or turned off 
response
buffering? Would u mind sending complete code of code-behind page?

-----Original Message-----
From: judyn@s... [mailto:judyn@s...]
Sent: Monday, March 24, 2003 10:19 AM
To: aspx_beginners
Subject: [aspx_beginners] my button is in a twilight zone


I made this button, double clicked on it and in the code behind I put in
Response.Write("working"): Response.End(); so why does it reload a blank
page with nothing in it?

Help!!!!!!!

Judy





Message #3 by judyn@s... on Sun, 23 Mar 2003 19:33:17 -0800
I have a friend working on the problem who knows so much more then I do and he feels that isn't the
problem. I'd love it if you can figure it out and take a look at my behind lol here it is .

it's an ascx.cs file.  I've only opened up .net a few weeks ago so please don't laugh at my coding lol thanks
Judy


namespace Voodoo.UserControls
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;

	/// <summary>
	///		Summary description for AddNew.
	/// </summary>
	public abstract class Update : System.Web.UI.UserControl
	{
		protected System.Web.UI.WebControls.CheckBoxList SubSysList;
		protected System.Web.UI.WebControls.CheckBoxList PurposeList;
		protected System.Web.UI.WebControls.Button UpdateProductBtn;
		protected System.Web.UI.WebControls.DataList featureList;
		protected System.Web.UI.WebControls.Label compTypelbl;
		protected System.Web.UI.WebControls.Label datelbl;
		protected System.Web.UI.WebControls.Label modNamelbl;
		protected System.Web.UI.WebControls.DataList DupFeList;
		protected System.Web.UI.WebControls.DataList AttributeList;
		protected System.Web.UI.WebControls.TextBox AddAttIDTxt;
		protected System.Web.UI.WebControls.TextBox AddAttNametxt;
		protected System.Web.UI.WebControls.TextBox AddAttValtxt;
		protected System.Web.UI.WebControls.TextBox AddAttUnittxt;
		protected System.Web.UI.WebControls.Button AddNewAttbtn;
		protected System.Web.UI.WebControls.TextBox AddFeatItemtxt;
		protected System.Web.UI.WebControls.TextBox AddFeaturetxt;
		protected System.Web.UI.WebControls.Button AddFeaturebtn;
		protected System.Web.UI.WebControls.Button PurUpdateBtn;
		protected System.Web.UI.WebControls.Button SubSUpdateBtn;
		protected System.Web.UI.WebControls.DropDownList DropDownList1;
		protected System.Web.UI.WebControls.CheckBoxList TechPathList;
		protected System.Web.UI.WebControls.Button TPUpdateBtn;
		protected System.Web.UI.WebControls.TextBox Skutxt;
		protected System.Web.UI.WebControls.TextBox Nametxt;
		protected System.Web.UI.WebControls.TextBox Descriptiontxt;
		protected System.Web.UI.WebControls.Image prodImage;
		protected System.Web.UI.WebControls.Label imageLabel;
		protected System.Web.UI.WebControls.Label CompTypelbl;

		private void Page_Load(object sender, System.EventArgs e)
		{
			string sku = Session["sku"].ToString();

			DisplaySku(sku);
			DisplayProduct(sku);
			DisplayFeatures(sku);
			DisplayAttributes(sku);
			DisplayTechPath(sku);
//			DisplayPurpose(sku);
//			DisplaySubSys(sku);
			DisplayComp(sku);
			DisplayHistory(sku);
		}


		private void DisplaySku(string sku)
		{
			Skutxt.Text = (sku);
		}

		

		private void DisplayProduct(string sku)
		{
			MainExec exec = new MainExec();

			DataSet product = exec.GetProduct(sku);
			DataRow productRow = product.Tables[0].Rows[0];

			Nametxt.Text = productRow["name"].ToString();
			Descriptiontxt.Text = productRow["description"].ToString();
		}

		private void DisplayFeatures(string sku)
		{
			MainExec exec = new MainExec();

			DataSet feature = exec.GetFeatures(sku);

			featureList.DataSource = feature.Tables["nqk_SKU_features"].DefaultView;
			featureList.DataBind();

//			FindDuplicateFeatures(sku);
		}

//		private void FindDuplicateFeatures(string sku)
//		{
//			MainExec exec = new MainExec();
//
//			DataSet FindDupFeatures = exec.FindDuplicateFeatures(sku);
//			DataRow FindDFRow = FindDupFeatures.Tables[0].Rows[0];
//
//			string subsys_ID = FindDFRow["subsys_ID"].ToString();
//			string comp_ID = FindDFRow["comp_ID"].ToString();
//
//			GetDuplicateFeatures(subsys_ID, comp_ID, sku);
//			
//		}
//
//		private void GetDuplicateFeatures(string subsys_ID, string comp_ID, string sku)
//		{
////			Response.Write("working");
////			Response.End();
//			MainExec exec = new MainExec();
//
//			DataSet GetDuplicateFeatures = exec.GetDuplicateFeatures(subsys_ID, comp_ID, sku);
//
//			DupFeList.DataSource = GetDuplicateFeatures.Tables["nqk_product"].DefaultView;
//			DupFeList.DataBind();
//		}
//	
//
//
		private void DisplayAttributes(string sku)
		{
			MainExec exec = new MainExec();

			DataSet Att = exec.GetAttributes(sku);

			AttributeList.DataSource = Att.Tables["nqk_attributes"].DefaultView;
			AttributeList.DataBind();
		}

		private void DisplayTechPath(string sku)
		{
			MainExec exec = new MainExec();

			DataSet techPath = exec.GetTechPath(sku);

			TechPathList.DataSource = techPath.Tables["nqk_SKU_tech"].DefaultView;
			TechPathList.DataBind();
		}
//
//		private void DisplayPurpose(string sku)
//		{
//			MainExec exec = new MainExec();
//
//			DataSet purpose = exec.GetPurpose(sku);
//
//			purposeList.DataSource= purpose.Tables["nqk_purposes"].DefaultView;
//			purposeList.DataBind();
//		}
//
//		private void DisplaySubSys(string sku)
//		{
//			MainExec exec = new MainExec();
//
//			DataSet SubSys = exec.GetSubSys(sku);
//
//			DataRow SubSysRow = SubSys.Tables[0].Rows[0];
//			subsyslbl.Text = SubSysRow["sub_system"].ToString();
//		}
//
		private void DisplayComp(string sku)
		{
			MainExec exec = new MainExec();

			DataSet comp = exec.GetComp(sku);

			DataRow compRow = comp.Tables[0].Rows[0];
			compTypelbl.Text = compRow["component"].ToString();
		}

		private void DisplayHistory(string sku)
		{
			MainExec exec = new MainExec();

			DataSet history = exec.GetHistory(sku);

			DataRow historyRow = history.Tables[0].Rows[0];
			datelbl.Text = historyRow["last_mod"].ToString();
			modNamelbl.Text = historyRow["user_mod"].ToString();
		}


		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		///		Required method for Designer support - do not modify
		///		the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.UpdateProductBtn.Click += new System.EventHandler(this.UpdateProductBtn_Click);
			this.AddNewAttbtn.Click += new System.EventHandler(this.AddNewAttbtn_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void UpdateProductBtn_Click(object sender, System.EventArgs e)
		{
			Response.Redirect( "http://www.msn.com" );
			Response.End();
			string sku = Skutxt.Text;
			string name = Nametxt.Text;
			string description = Descriptiontxt.Text;
			

			ModifyExec exec = new ModifyExec();

			exec.UpdateProduct(sku, name, description);

		}

		private void AddNewAttbtn_Click(object sender, System.EventArgs e)
		{
			Response.Redirect( "http://www.msn.com" );
			Response.End();
		}

		
		

		
	}
}


----- Original Message -----
From: irfan.syed@g...
Date: Sunday, March 23, 2003 6:36 pm
Subject: [aspx_beginners] RE: my button is in a twilight zone

> Any other condition u put in there like IsPostBack or turned off 
> responsebuffering? Would u mind sending complete code of code-
> behind page?
> 
> -----Original Message-----
> From: judyn@s... [mailto:judyn@s...] 
> Sent: Monday, March 24, 2003 10:19 AM
> To: aspx_beginners
> Subject: [aspx_beginners] my button is in a twilight zone
> 
> 
> I made this button, double clicked on it and in the code behind I 
> put in
> Response.Write("working"): Response.End(); so why does it reload a 
> blankpage with nothing in it?
> 
> Help!!!!!!!
> 
> Judy
> 
> 
> 
> 
> 
> 
> to unsubscribe send a blank email to leave-aspx_beginners-
> 4613477L@p...

Message #4 by irfan.syed@g... on Mon, 24 Mar 2003 12:30:19 +0800
Hi Judy,

I can only see the code

Response.write("Working");
Response.End();

in GetDubplicateFeatures function and I don't see any code where you 
call
this function? Call this function from event handler of your button and 
it
should work!

-----Original Message-----
From: judyn@s... [mailto:judyn@s...]
Sent: Monday, March 24, 2003 11:33 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: my button is in a twilight zone


I have a friend working on the problem who knows so much more then I do
and he feels that isn't the problem. I'd love it if you can figure it 
out
and take a look at my behind lol here it is .

it's an ascx.cs file.  I've only opened up .net a few weeks ago so 
please
don't laugh at my coding lol thanks Judy


namespace Voodoo.UserControls
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;

	/// <summary>
	///		Summary description for AddNew.
	/// </summary>
	public abstract class Update : System.Web.UI.UserControl
	{
		protected System.Web.UI.WebControls.CheckBoxList
SubSysList;
		protected System.Web.UI.WebControls.CheckBoxList
PurposeList;
		protected System.Web.UI.WebControls.Button
UpdateProductBtn;
		protected System.Web.UI.WebControls.DataList featureList;
		protected System.Web.UI.WebControls.Label compTypelbl;
		protected System.Web.UI.WebControls.Label datelbl;
		protected System.Web.UI.WebControls.Label modNamelbl;
		protected System.Web.UI.WebControls.DataList DupFeList;
		protected System.Web.UI.WebControls.DataList
AttributeList;
		protected System.Web.UI.WebControls.TextBox AddAttIDTxt;
		protected System.Web.UI.WebControls.TextBox AddAttNametxt;
		protected System.Web.UI.WebControls.TextBox AddAttValtxt;
		protected System.Web.UI.WebControls.TextBox AddAttUnittxt;
		protected System.Web.UI.WebControls.Button AddNewAttbtn;
		protected System.Web.UI.WebControls.TextBox
AddFeatItemtxt;
		protected System.Web.UI.WebControls.TextBox AddFeaturetxt;
		protected System.Web.UI.WebControls.Button AddFeaturebtn;
		protected System.Web.UI.WebControls.Button PurUpdateBtn;
		protected System.Web.UI.WebControls.Button SubSUpdateBtn;
		protected System.Web.UI.WebControls.DropDownList
DropDownList1;
		protected System.Web.UI.WebControls.CheckBoxList
TechPathList;
		protected System.Web.UI.WebControls.Button TPUpdateBtn;
		protected System.Web.UI.WebControls.TextBox Skutxt;
		protected System.Web.UI.WebControls.TextBox Nametxt;
		protected System.Web.UI.WebControls.TextBox
Descriptiontxt;
		protected System.Web.UI.WebControls.Image prodImage;
		protected System.Web.UI.WebControls.Label imageLabel;
		protected System.Web.UI.WebControls.Label CompTypelbl;

		private void Page_Load(object sender, System.EventArgs e)
		{
			string sku =3D Session["sku"].ToString();

			DisplaySku(sku);
			DisplayProduct(sku);
			DisplayFeatures(sku);
			DisplayAttributes(sku);
			DisplayTechPath(sku);
//			DisplayPurpose(sku);
//			DisplaySubSys(sku);
			DisplayComp(sku);
			DisplayHistory(sku);
		}


		private void DisplaySku(string sku)
		{
			Skutxt.Text =3D (sku);
		}

	=09

		private void DisplayProduct(string sku)
		{
			MainExec exec =3D new MainExec();

			DataSet product =3D exec.GetProduct(sku);
			DataRow productRow =3D product.Tables[0].Rows[0];

			Nametxt.Text =3D productRow["name"].ToString();
			Descriptiontxt.Text =3D
productRow["description"].ToString();
		}

		private void DisplayFeatures(string sku)
		{
			MainExec exec =3D new MainExec();

			DataSet feature =3D exec.GetFeatures(sku);

			featureList.DataSource =3D
feature.Tables["nqk_SKU_features"].DefaultView;
			featureList.DataBind();

//			FindDuplicateFeatures(sku);
		}

//		private void FindDuplicateFeatures(string sku)
//		{
//			MainExec exec =3D new MainExec();
//
//			DataSet FindDupFeatures =3D
exec.FindDuplicateFeatures(sku);
//			DataRow FindDFRow =3D
FindDupFeatures.Tables[0].Rows[0];
//
//			string subsys_ID =3D
FindDFRow["subsys_ID"].ToString();
//			string comp_ID =3D FindDFRow["comp_ID"].ToString();
//
//			GetDuplicateFeatures(subsys_ID, comp_ID, sku);
//		=09
//		}
//
//		private void GetDuplicateFeatures(string subsys_ID, string
comp_ID, string sku)
//		{
////			Response.Write("working");
////			Response.End();
//			MainExec exec =3D new MainExec();
//
//			DataSet GetDuplicateFeatures =3D
exec.GetDuplicateFeatures(subsys_ID, comp_ID, sku);
//
//			DupFeList.DataSource =3D
GetDuplicateFeatures.Tables["nqk_product"].DefaultView;
//			DupFeList.DataBind();
//		}
//=09
//
//
		private void DisplayAttributes(string sku)
		{
			MainExec exec =3D new MainExec();

			DataSet Att =3D exec.GetAttributes(sku);

			AttributeList.DataSource =3D
Att.Tables["nqk_attributes"].DefaultView;
			AttributeList.DataBind();
		}

		private void DisplayTechPath(string sku)
		{
			MainExec exec =3D new MainExec();

			DataSet techPath =3D exec.GetTechPath(sku);

			TechPathList.DataSource =3D
techPath.Tables["nqk_SKU_tech"].DefaultView;
			TechPathList.DataBind();
		}
//
//		private void DisplayPurpose(string sku)
//		{
//			MainExec exec =3D new MainExec();
//
//			DataSet purpose =3D exec.GetPurpose(sku);
//
//			purposeList.DataSource=3D
purpose.Tables["nqk_purposes"].DefaultView;
//			purposeList.DataBind();
//		}
//
//		private void DisplaySubSys(string sku)
//		{
//			MainExec exec =3D new MainExec();
//
//			DataSet SubSys =3D exec.GetSubSys(sku);
//
//			DataRow SubSysRow =3D SubSys.Tables[0].Rows[0];
//			subsyslbl.Text =3D
SubSysRow["sub_system"].ToString();
//		}
//
		private void DisplayComp(string sku)
		{
			MainExec exec =3D new MainExec();

			DataSet comp =3D exec.GetComp(sku);

			DataRow compRow =3D comp.Tables[0].Rows[0];
			compTypelbl.Text =3D
compRow["component"].ToString();
		}

		private void DisplayHistory(string sku)
		{
			MainExec exec =3D new MainExec();

			DataSet history =3D exec.GetHistory(sku);

			DataRow historyRow =3D history.Tables[0].Rows[0];
			datelbl.Text =3D historyRow["last_mod"].ToString();
			modNamelbl.Text =3D
historyRow["user_mod"].ToString();
		}


		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET
Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
	=09
		///		Required method for Designer support - do
not modify
		///		the contents of this method with the code
editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.UpdateProductBtn.Click +=3D new
System.EventHandler(this.UpdateProductBtn_Click);
			this.AddNewAttbtn.Click +=3D new
System.EventHandler(this.AddNewAttbtn_Click);
			this.Load +=3D new
System.EventHandler(this.Page_Load);

		}
		#endregion

		private void UpdateProductBtn_Click(object sender,
System.EventArgs e)
		{
			Response.Redirect( "http://www.msn.com" );
			Response.End();
			string sku =3D Skutxt.Text;
			string name =3D Nametxt.Text;
			string description =3D Descriptiontxt.Text;
		=09

			ModifyExec exec =3D new ModifyExec();

			exec.UpdateProduct(sku, name, description);

		}

		private void AddNewAttbtn_Click(object sender,
System.EventArgs e)
		{
			Response.Redirect( "http://www.msn.com" );
			Response.End();
		}

	=09
	=09

	=09
	}
}


----- Original Message -----
From: irfan.syed@g...
Date: Sunday, March 23, 2003 6:36 pm
Subject: [aspx_beginners] RE: my button is in a twilight zone

> Any other condition u put in there like IsPostBack or turned off
> responsebuffering? Would u mind sending complete code of code- behind
> page?
>
> -----Original Message-----
> From: judyn@s... [mailto:judyn@s...]
> Sent: Monday, March 24, 2003 10:19 AM
> To: aspx_beginners
> Subject: [aspx_beginners] my button is in a twilight zone
>
>
> I made this button, double clicked on it and in the code behind I put
> in
> Response.Write("working"): Response.End(); so why does it reload a
> blankpage with nothing in it?
>
> Help!!!!!!!
>
> Judy
>
>
>
>
>
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or to
> unsubscribe send a blank email to 
>
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or to
> unsubscribe send a blank email to leave-aspx_beginners-
> 4613477L@p...


Message #5 by judyn@s... on Sun, 23 Mar 2003 20:35:53 -0800
this is the method that is called when the button is clicked

private void UpdateProductBtn_Click(object sender,
System.EventArgs e)
         {
                 Response.Redirect( "http://www.msn.com" );
                 Response.End();
                 string sku = Skutxt.Text;
                 string name = Nametxt.Text;
                 string description = Descriptiontxt.Text;
                 

                 ModifyExec exec = new ModifyExec();

                 exec.UpdateProduct(sku, name, description);

         }


it wasn't doing anything so I put the response redirect to test it out and it's not getting anything.  What we seem to think is
happening is because it's a control, when the button is clicked we lose the control.  

Judy

----- Original Message -----
From: irfan.syed@g...
Date: Sunday, March 23, 2003 8:30 pm
Subject: [aspx_beginners] RE: my button is in a twilight zone

> Hi Judy,
> 
> I can only see the code 
> 
> Response.write("Working");
> Response.End();
> 
> in GetDubplicateFeatures function and I don't see any code where 
> you call
> this function? Call this function from event handler of your 
> button and it
> should work!
> 
> -----Original Message-----
> From: judyn@s... [mailto:judyn@s...] 
> Sent: Monday, March 24, 2003 11:33 AM
> To: aspx_beginners
> Subject: [aspx_beginners] RE: my button is in a twilight zone
> 
> 
> I have a friend working on the problem who knows so much more then 
> I do
> and he feels that isn't the problem. I'd love it if you can figure 
> it out
> and take a look at my behind lol here it is .
> 
> it's an ascx.cs file.  I've only opened up .net a few weeks ago so 
> pleasedon't laugh at my coding lol thanks Judy
> 
> 
> namespace Voodoo.UserControls
> {
> 	using System;
> 	using System.Data;
> 	using System.Drawing;
> 	using System.Web;
> 	using System.Web.UI.WebControls;
> 	using System.Web.UI.HtmlControls;
> 
> 	/// <summary>
> 	///        	Summary description for AddNew.
> 	/// </summary>
> 	public abstract class Update : System.Web.UI.UserControl
> 	{
>        	protected System.Web.UI.WebControls.CheckBoxList
> SubSysList;
>        	protected System.Web.UI.WebControls.CheckBoxList
> PurposeList;
>        	protected System.Web.UI.WebControls.Button
> UpdateProductBtn;
>        	protected System.Web.UI.WebControls.DataList featureList;
>        	protected System.Web.UI.WebControls.Label compTypelbl;
>        	protected System.Web.UI.WebControls.Label datelbl;
>        	protected System.Web.UI.WebControls.Label modNamelbl;
>        	protected System.Web.UI.WebControls.DataList DupFeList;
>        	protected System.Web.UI.WebControls.DataList
> AttributeList;
>        	protected System.Web.UI.WebControls.TextBox AddAttIDTxt;
>        	protected System.Web.UI.WebControls.TextBox AddAttNametxt;
>        	protected System.Web.UI.WebControls.TextBox AddAttValtxt;
>        	protected System.Web.UI.WebControls.TextBox AddAttUnittxt;
>        	protected System.Web.UI.WebControls.Button AddNewAttbtn;
>        	protected System.Web.UI.WebControls.TextBox
> AddFeatItemtxt;
>        	protected System.Web.UI.WebControls.TextBox AddFeaturetxt;
>        	protected System.Web.UI.WebControls.Button AddFeaturebtn;
>        	protected System.Web.UI.WebControls.Button PurUpdateBtn;
>        	protected System.Web.UI.WebControls.Button SubSUpdateBtn;
>        	protected System.Web.UI.WebControls.DropDownList
> DropDownList1;
>        	protected System.Web.UI.WebControls.CheckBoxList
> TechPathList;
>        	protected System.Web.UI.WebControls.Button TPUpdateBtn;
>        	protected System.Web.UI.WebControls.TextBox Skutxt;
>        	protected System.Web.UI.WebControls.TextBox Nametxt;
>        	protected System.Web.UI.WebControls.TextBox
> Descriptiontxt;
>        	protected System.Web.UI.WebControls.Image prodImage;
>        	protected System.Web.UI.WebControls.Label imageLabel;
>        	protected System.Web.UI.WebControls.Label CompTypelbl;
> 
>        	private void Page_Load(object sender, System.EventArgs e)
>        	{
>                	string sku = Session["sku"].ToString();
> 
>                	DisplaySku(sku);
>                	DisplayProduct(sku);
>                	DisplayFeatures(sku);
>                	DisplayAttributes(sku);
>                	DisplayTechPath(sku);
> //                	DisplayPurpose(sku);
> //                	DisplaySubSys(sku);
>                	DisplayComp(sku);
>                	DisplayHistory(sku);
>        	}
> 
> 
>        	private void DisplaySku(string sku)
>        	{
>                	Skutxt.Text = (sku);
>        	}
> 
>        	
> 
>        	private void DisplayProduct(string sku)
>        	{
>                	MainExec exec = new MainExec();
> 
>                	DataSet product = exec.GetProduct(sku);
>                	DataRow productRow = product.Tables[0].Rows[0];
> 
>                	Nametxt.Text = productRow["name"].ToString();
>                	Descriptiontxt.Text 
> productRow["description"].ToString();
>        	}
> 
>        	private void DisplayFeatures(string sku)
>        	{
>                	MainExec exec = new MainExec();
> 
>                	DataSet feature = exec.GetFeatures(sku);
> 
>                	featureList.DataSource 
> feature.Tables["nqk_SKU_features"].DefaultView;
>                	featureList.DataBind();
> 
> //                	FindDuplicateFeatures(sku);
>        	}
> 
> //        	private void FindDuplicateFeatures(string sku)
> //        	{
> //                	MainExec exec = new MainExec();
> //
> //                	DataSet FindDupFeatures 
> exec.FindDuplicateFeatures(sku);
> //                	DataRow FindDFRow 
> FindDupFeatures.Tables[0].Rows[0];
> //
> //                	string subsys_ID 
> FindDFRow["subsys_ID"].ToString();
> //                	string comp_ID = FindDFRow["comp_ID"].ToString();
> //
> //                	GetDuplicateFeatures(subsys_ID, comp_ID, sku);
> //                	
> //        	}
> //
> //        	private void GetDuplicateFeatures(string subsys_ID, string
> comp_ID, string sku)
> //        	{
> ////                	Response.Write("working");
> ////                	Response.End();
> //                	MainExec exec = new MainExec();
> //
> //                	DataSet GetDuplicateFeatures 
> exec.GetDuplicateFeatures(subsys_ID, comp_ID, sku);
> //
> //                	DupFeList.DataSource 
> GetDuplicateFeatures.Tables["nqk_product"].DefaultView;
> //                	DupFeList.DataBind();
> //        	}
> //	
> //
> //
>        	private void DisplayAttributes(string sku)
>        	{
>                	MainExec exec = new MainExec();
> 
>                	DataSet Att = exec.GetAttributes(sku);
> 
>                	AttributeList.DataSource 
> Att.Tables["nqk_attributes"].DefaultView;
>                	AttributeList.DataBind();
>        	}
> 
>        	private void DisplayTechPath(string sku)
>        	{
>                	MainExec exec = new MainExec();
> 
>                	DataSet techPath = exec.GetTechPath(sku);
> 
>                	TechPathList.DataSource 
> techPath.Tables["nqk_SKU_tech"].DefaultView;
>                	TechPathList.DataBind();
>        	}
> //
> //        	private void DisplayPurpose(string sku)
> //        	{
> //                	MainExec exec = new MainExec();
> //
> //                	DataSet purpose = exec.GetPurpose(sku);
> //
> //                	purposeList.DataSource
> purpose.Tables["nqk_purposes"].DefaultView;
> //                	purposeList.DataBind();
> //        	}
> //
> //        	private void DisplaySubSys(string sku)
> //        	{
> //                	MainExec exec = new MainExec();
> //
> //                	DataSet SubSys = exec.GetSubSys(sku);
> //
> //                	DataRow SubSysRow = SubSys.Tables[0].Rows[0];
> //                	subsyslbl.Text 
> SubSysRow["sub_system"].ToString();
> //        	}
> //
>        	private void DisplayComp(string sku)
>        	{
>                	MainExec exec = new MainExec();
> 
>                	DataSet comp = exec.GetComp(sku);
> 
>                	DataRow compRow = comp.Tables[0].Rows[0];
>                	compTypelbl.Text 
> compRow["component"].ToString();
>        	}
> 
>        	private void DisplayHistory(string sku)
>        	{
>                	MainExec exec = new MainExec();
> 
>                	DataSet history = exec.GetHistory(sku);
> 
>                	DataRow historyRow = history.Tables[0].Rows[0];
>                	datelbl.Text = historyRow["last_mod"].ToString();
>                	modNamelbl.Text 
> historyRow["user_mod"].ToString();
>        	}
> 
> 
>        	#region Web Form Designer generated code
>        	override protected void OnInit(EventArgs e)
>        	{
>                	//
>                	// CODEGEN: This call is required by the ASP.NET
> Web Form Designer.
>                	//
>                	InitializeComponent();
>                	base.OnInit(e);
>        	}
>        	
>        	///        	Required method for Designer support - do
> not modify
>        	///        	the contents of this method with the code
> editor.
>        	/// </summary>
>        	private void InitializeComponent()
>        	{
>                	this.UpdateProductBtn.Click += new
> System.EventHandler(this.UpdateProductBtn_Click);
>                	this.AddNewAttbtn.Click += new
> System.EventHandler(this.AddNewAttbtn_Click);
>                	this.Load += new
> System.EventHandler(this.Page_Load);
> 
>        	}
>        	#endregion
> 
>        	private void UpdateProductBtn_Click(object sender,
> System.EventArgs e)
>        	{
>                	Response.Redirect( "http://www.msn.com" );
>                	Response.End();
>                	string sku = Skutxt.Text;
>                	string name = Nametxt.Text;
>                	string description = Descriptiontxt.Text;
>                	
> 
>                	ModifyExec exec = new ModifyExec();
> 
>                	exec.UpdateProduct(sku, name, description);
> 
>        	}
> 
>        	private void AddNewAttbtn_Click(object sender,
> System.EventArgs e)
>        	{
>                	Response.Redirect( "http://www.msn.com" );
>                	Response.End();
>        	}
> 
>        	
>        	
> 
>        	
> 	}
> }
> 
> 
> ----- Original Message -----
> From: irfan.syed@g...
> Date: Sunday, March 23, 2003 6:36 pm
> Subject: [aspx_beginners] RE: my button is in a twilight zone
> 
> > Any other condition u put in there like IsPostBack or turned off 
> > responsebuffering? Would u mind sending complete code of code- 
> behind 
> > page?
> > 
> > -----Original Message-----
> > From: judyn@s... [mailto:judyn@s...]
> > Sent: Monday, March 24, 2003 10:19 AM
> > To: aspx_beginners
> > Subject: [aspx_beginners] my button is in a twilight zone
> > 
> > 
> > I made this button, double clicked on it and in the code behind 
> I put 
> > in
> > Response.Write("working"): Response.End(); so why does it reload a
> > blankpage with nothing in it?
> > 
> > Help!!!!!!!
> > 
> > Judy
> > 
> > 
> > 
> > 
> > 
> to 
> > unsubscribe send a blank email to 
> > 
> to 
> > unsubscribe send a blank email to leave-aspx_beginners- 
> > 4613477L@p...
> 
> 
> 
> to unsubscribe send a blank email to leave-aspx_beginners-
> 4613477L@p...

Message #6 by irfan.syed@g... on Mon, 24 Mar 2003 14:23:37 +0800
Have you tried to debug it? I am sorry I could not figure out the 
problem,
as all code looks ok. Maybe if you don't mind, zip the aspx and related
.cs file and email me off the list. Let me setup a project and debug.

Cheers,

-----Original Message-----
From: judyn@s... [mailto:judyn@s...]
Sent: Monday, March 24, 2003 12:36 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: my button is in a twilight zone


this is the method that is called when the button is clicked

private void UpdateProductBtn_Click(object sender, System.EventArgs e)
         {
                 Response.Redirect( "http://www.msn.com" );
                 Response.End();
                 string sku =3D Skutxt.Text;
                 string name =3D Nametxt.Text;
                 string description =3D Descriptiontxt.Text;
                

                 ModifyExec exec =3D new ModifyExec();

                 exec.UpdateProduct(sku, name, description);

         }


it wasn't doing anything so I put the response redirect to test it out 
and
it's not getting anything.  What we seem to think is happening is 
because
it's a control, when the button is clicked we lose the control. 

Judy

----- Original Message -----
From: irfan.syed@g...
Date: Sunday, March 23, 2003 8:30 pm
Subject: [aspx_beginners] RE: my button is in a twilight zone

> Hi Judy,
>
> I can only see the code
>
> Response.write("Working");
> Response.End();
>
> in GetDubplicateFeatures function and I don't see any code where
> you call
> this function? Call this function from event handler of your
> button and it
> should work!
>
> -----Original Message-----
> From: judyn@s... [mailto:judyn@s...]
> Sent: Monday, March 24, 2003 11:33 AM
> To: aspx_beginners
> Subject: [aspx_beginners] RE: my button is in a twilight zone
>
>
> I have a friend working on the problem who knows so much more then
> I do
> and he feels that isn't the problem. I'd love it if you can figure
> it out
> and take a look at my behind lol here it is .
>
> it's an ascx.cs file.  I've only opened up .net a few weeks ago so
> pleasedon't laugh at my coding lol thanks Judy
>
>
> namespace Voodoo.UserControls
> {
> 	using System;
> 	using System.Data;
> 	using System.Drawing;
> 	using System.Web;
> 	using System.Web.UI.WebControls;
> 	using System.Web.UI.HtmlControls;
>
> 	/// <summary>
> 	///        	Summary description for AddNew.
> 	/// </summary>
> 	public abstract class Update : System.Web.UI.UserControl
> 	{
>        	protected System.Web.UI.WebControls.CheckBoxList
> SubSysList;
>        	protected System.Web.UI.WebControls.CheckBoxList
> PurposeList;
>        	protected System.Web.UI.WebControls.Button
UpdateProductBtn;
>        	protected System.Web.UI.WebControls.DataList featureList;
>        	protected System.Web.UI.WebControls.Label compTypelbl;
>        	protected System.Web.UI.WebControls.Label datelbl;
>        	protected System.Web.UI.WebControls.Label modNamelbl;
>        	protected System.Web.UI.WebControls.DataList DupFeList;
>        	protected System.Web.UI.WebControls.DataList
> AttributeList;
>        	protected System.Web.UI.WebControls.TextBox AddAttIDTxt;
>        	protected System.Web.UI.WebControls.TextBox AddAttNametxt;
>        	protected System.Web.UI.WebControls.TextBox AddAttValtxt;
>        	protected System.Web.UI.WebControls.TextBox AddAttUnittxt;
>        	protected System.Web.UI.WebControls.Button AddNewAttbtn;
>        	protected System.Web.UI.WebControls.TextBox
> AddFeatItemtxt;
>        	protected System.Web.UI.WebControls.TextBox AddFeaturetxt;
>        	protected System.Web.UI.WebControls.Button AddFeaturebtn;
>        	protected System.Web.UI.WebControls.Button PurUpdateBtn;
>        	protected System.Web.UI.WebControls.Button SubSUpdateBtn;
>        	protected System.Web.UI.WebControls.DropDownList
> DropDownList1;
>        	protected System.Web.UI.WebControls.CheckBoxList
> TechPathList;
>        	protected System.Web.UI.WebControls.Button TPUpdateBtn;
>        	protected System.Web.UI.WebControls.TextBox Skutxt;
>        	protected System.Web.UI.WebControls.TextBox Nametxt;
>        	protected System.Web.UI.WebControls.TextBox
> Descriptiontxt;
>        	protected System.Web.UI.WebControls.Image prodImage;
>        	protected System.Web.UI.WebControls.Label imageLabel;
>        	protected System.Web.UI.WebControls.Label CompTypelbl;
>
>        	private void Page_Load(object sender, System.EventArgs e)
>        	{
>                	string sku =3D Session["sku"].ToString();
>
>                	DisplaySku(sku);
>                	DisplayProduct(sku);
>                	DisplayFeatures(sku);
>                	DisplayAttributes(sku);
>                	DisplayTechPath(sku);
> //                	DisplayPurpose(sku);
> //                	DisplaySubSys(sku);
>                	DisplayComp(sku);
>                	DisplayHistory(sku);
>        	}
>
>
>        	private void DisplaySku(string sku)
>        	{
>                	Skutxt.Text =3D (sku);
>        	}
>
>        =09
>
>        	private void DisplayProduct(string sku)
>        	{
>                	MainExec exec =3D new MainExec();
>
>                	DataSet product =3D exec.GetProduct(sku);
>                	DataRow productRow =3D product.Tables[0].Rows[0];
>
>                	Nametxt.Text =3D productRow["name"].ToString();
>                	Descriptiontxt.Text =3D
> productRow["description"].ToString();
>        	}
>
>        	private void DisplayFeatures(string sku)
>        	{
>                	MainExec exec =3D new MainExec();
>
>                	DataSet feature =3D exec.GetFeatures(sku);
>
>                	featureList.DataSource =3D
> feature.Tables["nqk_SKU_features"].DefaultView;
>                	featureList.DataBind();
>
> //                	FindDuplicateFeatures(sku);
>        	}
>
> //        	private void FindDuplicateFeatures(string sku)
> //        	{
> //                	MainExec exec =3D new MainExec();
> //
> //                	DataSet FindDupFeatures =3D
> exec.FindDuplicateFeatures(sku);
> //                	DataRow FindDFRow =3D
> FindDupFeatures.Tables[0].Rows[0];
> //
> //                	string subsys_ID =3D
> FindDFRow["subsys_ID"].ToString();
> //                	string comp_ID =3D FindDFRow["comp_ID"].ToString();
> //
> //                	GetDuplicateFeatures(subsys_ID, comp_ID, sku);
> //                =09
> //        	}
> //
> //        	private void GetDuplicateFeatures(string subsys_ID, string
> comp_ID, string sku)
> //        	{
> ////                	Response.Write("working");
> ////                	Response.End();
> //                	MainExec exec =3D new MainExec();
> //
> //                	DataSet GetDuplicateFeatures =3D
> exec.GetDuplicateFeatures(subsys_ID, comp_ID, sku);
> //
> //                	DupFeList.DataSource =3D
> GetDuplicateFeatures.Tables["nqk_product"].DefaultView;
> //                	DupFeList.DataBind();
> //        	}
> //=09
> //
> //
>        	private void DisplayAttributes(string sku)
>        	{
>                	MainExec exec =3D new MainExec();
>
>                	DataSet Att =3D exec.GetAttributes(sku);
>
>                	AttributeList.DataSource =3D
> Att.Tables["nqk_attributes"].DefaultView;
>                	AttributeList.DataBind();
>        	}
>
>        	private void DisplayTechPath(string sku)
>        	{
>                	MainExec exec =3D new MainExec();
>
>                	DataSet techPath =3D exec.GetTechPath(sku);
>
>                	TechPathList.DataSource =3D
> techPath.Tables["nqk_SKU_tech"].DefaultView;
>                	TechPathList.DataBind();
>        	}
> //
> //        	private void DisplayPurpose(string sku)
> //        	{
> //                	MainExec exec =3D new MainExec();
> //
> //                	DataSet purpose =3D exec.GetPurpose(sku);
> //
> //                	purposeList.DataSource=3D
> purpose.Tables["nqk_purposes"].DefaultView;
> //                	purposeList.DataBind();
> //        	}
> //
> //        	private void DisplaySubSys(string sku)
> //        	{
> //                	MainExec exec =3D new MainExec();
> //
> //                	DataSet SubSys =3D exec.GetSubSys(sku);
> //
> //                	DataRow SubSysRow =3D SubSys.Tables[0].Rows[0];
> //                	subsyslbl.Text =3D
> SubSysRow["sub_system"].ToString();
> //        	}
> //
>        	private void DisplayComp(string sku)
>        	{
>                	MainExec exec =3D new MainExec();
>
>                	DataSet comp =3D exec.GetComp(sku);
>
>                	DataRow compRow =3D comp.Tables[0].Rows[0];
>                	compTypelbl.Text =3D
compRow["component"].ToString();
>        	}
>
>        	private void DisplayHistory(string sku)
>        	{
>                	MainExec exec =3D new MainExec();
>
>                	DataSet history =3D exec.GetHistory(sku);
>
>                	DataRow historyRow =3D history.Tables[0].Rows[0];
>                	datelbl.Text =3D historyRow["last_mod"].ToString();
>                	modNamelbl.Text =3D
historyRow["user_mod"].ToString();
>        	}
>
>
>        	#region Web Form Designer generated code
>        	override protected void OnInit(EventArgs e)
>        	{
>                	//
>                	// CODEGEN: This call is required by the ASP.NET
Web
> Form Designer.
>                	//
>                	InitializeComponent();
>                	base.OnInit(e);
>        	}
>        =09
>        	///        	Required method for Designer support - do
> not modify
>        	///        	the contents of this method with the code
> editor.
>        	/// </summary>
>        	private void InitializeComponent()
>        	{
>                	this.UpdateProductBtn.Click +=3D new
> System.EventHandler(this.UpdateProductBtn_Click);
>                	this.AddNewAttbtn.Click +=3D new
> System.EventHandler(this.AddNewAttbtn_Click);
>                	this.Load +=3D new
System.EventHandler(this.Page_Load);
>
>        	}
>        	#endregion
>
>        	private void UpdateProductBtn_Click(object sender,
> System.EventArgs e)
>        	{
>                	Response.Redirect( "http://www.msn.com" );
>                	Response.End();
>                	string sku =3D Skutxt.Text;
>                	string name =3D Nametxt.Text;
>                	string description =3D Descriptiontxt.Text;
>                =09
>
>                	ModifyExec exec =3D new ModifyExec();
>
>                	exec.UpdateProduct(sku, name, description);
>
>        	}
>
>        	private void AddNewAttbtn_Click(object sender,
> System.EventArgs e)
>        	{
>                	Response.Redirect( "http://www.msn.com" );
>                	Response.End();
>        	}
>
>        =09
>        =09
>
>        =09
> 	}
> }
>
>
> ----- Original Message -----
> From: irfan.syed@g...
> Date: Sunday, March 23, 2003 6:36 pm
> Subject: [aspx_beginners] RE: my button is in a twilight zone
>
> > Any other condition u put in there like IsPostBack or turned off
> > responsebuffering? Would u mind sending complete code of code-
> behind
> > page?
> >
> > -----Original Message-----
> > From: judyn@s... [mailto:judyn@s...]
> > Sent: Monday, March 24, 2003 10:19 AM
> > To: aspx_beginners
> > Subject: [aspx_beginners] my button is in a twilight zone
> >
> >
> > I made this button, double clicked on it and in the code behind
> I put
> > in
> > Response.Write("working"): Response.End(); so why does it reload a
> > blankpage with nothing in it?
> >
> > Help!!!!!!!
> >
> > Judy
> >
> >
> >
> >
> >
> to
> > unsubscribe send a blank email to 
> >
> to
> > unsubscribe send a blank email to leave-aspx_beginners-
> > 4613477L@p...
>
>
>
> to unsubscribe send a blank email to leave-aspx_beginners-
> 4613477L@p...



  Return to Index