2

I've a SQL DataSource and a Data Grid in a Web Page. The data grid gets binded automatically when the page is loaded. How do I delay that until click event of a Button.

1
  • @AmenAyach what will I do if I want to disconnect the bind at the click of another button. Commented Mar 4, 2012 at 6:42

1 Answer 1

1

In ButtonToBindclickevent

  • System.Web.HttpContext.Current.Session("BindUnbind")="b"
  • response.redirect("Mypage.aspx")

In ButtonToUnBindclickevent

  • System.Web.HttpContext.Current.Session("BindUnbind")="u"
  • response.redirect("Mypage.aspx")

*in page_load*

if System.Web.HttpContext.Current.Session("BindUnbind")="b" then

  • bind the grid

elseif System.Web.HttpContext.Current.Session("BindUnbind")="u" then

  • UNbind the grid

endif

System.Web.HttpContext.Current.Session("BindUnbind")=""

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.