7 Replies - 4879 Views - Last Post: 07 May 2008 - 09:56 AM Rate Topic: -----

#1 rgfirefly24  Icon User is offline

  • D.I.C Lover
  • member icon


Reputation: 282
  • View blog
  • Posts: 1,491
  • Joined: 07-April 08

adding variable data to a confirmbutton extender

Posted 06 May 2008 - 11:35 AM

ok so i have a confirm button extender that i am using instead of Javascript (this was a 1.5 week nightmare) but i need to add data from a variable to it. Is this possible?
Is This A Good Question/Topic? 0
  • +

Replies To: adding variable data to a confirmbutton extender

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: adding variable data to a confirmbutton extender

Posted 06 May 2008 - 02:09 PM

Do you mean you want to add it into the ConfirmText property?
Was This Post Helpful? 0
  • +
  • -

#3 rgfirefly24  Icon User is offline

  • D.I.C Lover
  • member icon


Reputation: 282
  • View blog
  • Posts: 1,491
  • Joined: 07-April 08

Re: adding variable data to a confirmbutton extender

Posted 07 May 2008 - 05:54 AM

View Postjayman9, on 6 May, 2008 - 02:09 PM, said:

Do you mean you want to add it into the ConfirmText property?


yes, i have a Session variable that i need to add to the ConfirmText property of the button using confirmbutton extender but when i mod the asp.net code to include it it still thinks of it as a string instead of a variable. I've tried it inside the quotes using escapes, single quotes, outside the quotes with a + concatination but none of that seems to work.
Was This Post Helpful? 0
  • +
  • -

#4 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: adding variable data to a confirmbutton extender

Posted 07 May 2008 - 08:41 AM

How are you currently trying to assign the value from your session variable to the confirmbuttonextender?

It should be something like this:
ConfirmButtonExtender.ConfirmText = Sesssion["SomeName"].ToString();



Make sure you check to see if the Session variable is null before attempting this, otherwise if it is null, it will crash your application.
Was This Post Helpful? 0
  • +
  • -

#5 rgfirefly24  Icon User is offline

  • D.I.C Lover
  • member icon


Reputation: 282
  • View blog
  • Posts: 1,491
  • Joined: 07-April 08

Re: adding variable data to a confirmbutton extender

Posted 07 May 2008 - 08:54 AM

View Postjayman9, on 7 May, 2008 - 08:41 AM, said:

How are you currently trying to assign the value from your session variable to the confirmbuttonextender?

It should be something like this:
ConfirmButtonExtender.ConfirmText = Sesssion["SomeName"].ToString();



Make sure you check to see if the Session variable is null before attempting this, otherwise if it is null, it will crash your application.


you are teh awsome! well for the most part :P it says there is no source code for this location, and attempted to find ConfirmButtonExtender.cs
Was This Post Helpful? 0
  • +
  • -

#6 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: adding variable data to a confirmbutton extender

Posted 07 May 2008 - 09:13 AM

Where in your code are you attempting to do this??
Was This Post Helpful? 0
  • +
  • -

#7 rgfirefly24  Icon User is offline

  • D.I.C Lover
  • member icon


Reputation: 282
  • View blog
  • Posts: 1,491
  • Joined: 07-April 08

Re: adding variable data to a confirmbutton extender

Posted 07 May 2008 - 09:17 AM

View Postjayman9, on 7 May, 2008 - 09:13 AM, said:

Where in your code are you attempting to do this??


	void BuildSession()
	{

		Connectto();

		String sqlretrieve = "sqlcommandthatworks";

		SqlCommand retrieve = new SqlCommand(sqlretrieve, connect);
		retrieve.Parameters.AddWithValue("@Country", ddlCountry.SelectedItem.ToString());

		int tmp = (int)retrieve.ExecuteScalar();
		Session["variable"] = "+" + tmp.ToString();

		Session["variable"] += " " + txtPhone.Text;

		Session["localvariable"] =  tmp.ToString();

		Session["localvariable"] +=  txtPhone.Text;
		 
		 if (Session["localvariable"] != "")
		{
	-> Confirmphone.ConfirmText = "Please confirm your phonenumber: " + Session["localvariable"].ToString(); 
		}
	}



this function is being called when a textbox autopostback is fired.

This post has been edited by rgfirefly24: 07 May 2008 - 09:19 AM

Was This Post Helpful? 0
  • +
  • -

#8 rgfirefly24  Icon User is offline

  • D.I.C Lover
  • member icon


Reputation: 282
  • View blog
  • Posts: 1,491
  • Joined: 07-April 08

Re: adding variable data to a confirmbutton extender

Posted 07 May 2008 - 09:56 AM

hrm, ok so the toolkit is installed correctly, but it still wants the .cs file. .... i searched my computer for it and it cant find it.

This post has been edited by rgfirefly24: 07 May 2008 - 11:16 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1