Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placing data on the page where I want it to go 2

Status
Not open for further replies.

Trusts

Programmer
Feb 23, 2005
268
US
Hi,

In the page load I am running sprocs and getting data back. I want this data to appear in certain parts of the page. My initial thought was to place it inside Divs already in place but then couldn't figure out how to make this work. Is this the way to accomplish this, or is there another method - such as panels?

Thanks,
KB
 
there are 2 schools of thought with asp.net and html generation.
1. the most common is to use web forms and server side controls. <asp:TextBox /> <asp:DropDownList /> ...
2. use a Restful MVC approach which bypasses server controls and viewstate. this is an advanced approach which is implemented in frameworks such as MS MVC and MonoRail.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
OK, I stuck a datagrid, attached to a SQLDataSourceControl. I configured the datasourcecontrol to pull data using the sproc, and that works in the "test" in the configuration wizard.

The grid - is attached to the sqldatasourcecontrol, but when I run the page I get nothing?
 
Code:
protected void OnLoad(EventArgs e)
{
  if (!IsPostback) NameOfGridView.DataBind();
}

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top