Click here to Skip to main content
15,900,725 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: problem Pin
Nagraj Naik23-Jun-06 22:47
Nagraj Naik23-Jun-06 22:47 
QuestionHey guys , how to handle a textchanged event Pin
Mohammed Amine23-Jun-06 13:12
Mohammed Amine23-Jun-06 13:12 
AnswerRe: Hey guys , how to handle a textchanged event Pin
Nagraj Naik23-Jun-06 19:29
Nagraj Naik23-Jun-06 19:29 
QuestionHow to Get the Id of a Dynamically Generated Table in CS file. [modified] Pin
antontj23-Jun-06 9:39
antontj23-Jun-06 9:39 
Questionpassing variable through multiple pages Pin
leckey23-Jun-06 8:34
leckey23-Jun-06 8:34 
AnswerRe: passing variable through multiple pages Pin
Not Active23-Jun-06 9:27
mentorNot Active23-Jun-06 9:27 
GeneralRe: passing variable through multiple pages Pin
leckey23-Jun-06 9:32
leckey23-Jun-06 9:32 
QuestionThe ongoing blank datagrid saga Pin
leckey23-Jun-06 4:59
leckey23-Jun-06 4:59 
My apologies to those of you who have read my multiple questions on my evil datagrid. Okay, it's not evil, but sometimes I think it is.

I have a webpage in which the user enters a part number in a textbox. User then clicks command button to load the datagrid. I created one project and got this to work beautifully thanks to the help of CodeProject people.

Then I found a fully editable datagrid and source code. Since it basically had the functionality I needed I started to modify that. This works differently in that you use a stored procedure, and use parameters to the server.

The original project just dumped out employee information from the Northwind database. Changed stuff so it just dumped out my part IDs. Worked fine. My problem comes from when I pass a parameter (the part number entered by the user). I'm new and confused. This is what happens:

Situation 1:
Call BindData in postback
private void Page_Load(object sender, System.EventArgs e)<br />
		{<br />
			<br />
			if(Page.IsPostBack)<br />
			{<br />
				BindData();		<br />
<br />
			}<br />
			<br />
		}<br />
<br />
		private void BindData()<br />
		{<br />
			strPartNumberInputReference = txtSearchPart.Text;<br />
			ds = new DataSet();<br />
			SqlParameter param = new SqlParameter("@PartID", strPartNumberInputReference);<br />
			ds=SqlHelper.ExecuteDataset(this.connectionString, CommandType.StoredProcedure, "dbo.GetPartInfoTest2", param);<br />
			//ds=SqlHelper.ExecuteDataset(this.connectionString, CommandType.StoredProcedure, "dbo.GetPartInfoTest");<br />
			Session["ds"]=ds;<br />
			dt = ds.Tables[0];<br />
			Session["dt"]=dt;<br />
			dgParts.DataSource=dt;<br />
			dgParts.DataBind();<br />
			txtSearchPart.Text = "";<br />
			<br />
		}


Go through debugger and goes through code just fine. (The adapters and stuff are in a SQLHelper.cs class.) But it doesn't return any rows.

Situation 2:
Call BindData on postback and when user clicks button:
same code as above plus
private void btnSearchPart_Click(object sender, System.EventArgs e)<br />
		{<br />
			BindData();<br />
		}

When I go through the debugger it goes through the stuff twice as expected. It returns rows, but it returns three blank rows.

I'm not sure at this point where the problem lies. I don't know if is a parameter issue, a BindData issue, a postback issue.

As always...huge thanks.
QuestionHow to create events for dynamically generated datagrid Pin
BalasahebK23-Jun-06 4:37
BalasahebK23-Jun-06 4:37 
AnswerRe: How to create events for dynamically generated datagrid Pin
l0kke23-Jun-06 5:17
l0kke23-Jun-06 5:17 
GeneralRe: How to create events for dynamically generated datagrid [modified] Pin
BalasahebK23-Jun-06 6:34
BalasahebK23-Jun-06 6:34 
GeneralRe: How to create events for dynamically generated datagrid [modified] Pin
l0kke25-Jun-06 2:42
l0kke25-Jun-06 2:42 
Questionhello guffa Pin
ballameharmurali23-Jun-06 4:01
ballameharmurali23-Jun-06 4:01 
AnswerRe: hello guffa Pin
Colin Angus Mackay23-Jun-06 4:47
Colin Angus Mackay23-Jun-06 4:47 
AnswerRe: hello guffa Pin
albCode23-Jun-06 5:07
albCode23-Jun-06 5:07 
AnswerRe: hello guffa Pin
Guffa23-Jun-06 5:17
Guffa23-Jun-06 5:17 
GeneralRe: hello guffa Pin
Colin Angus Mackay23-Jun-06 6:00
Colin Angus Mackay23-Jun-06 6:00 
QuestionHow do we create Nested Repeater Pin
Sankar Komma 23-Jun-06 3:41
Sankar Komma 23-Jun-06 3:41 
AnswerRe: How do we create Nested Repeater Pin
minhpc_bk24-Jun-06 13:18
minhpc_bk24-Jun-06 13:18 
QuestionMsgbox Error in 2005 Pin
Nagraj Naik23-Jun-06 3:36
Nagraj Naik23-Jun-06 3:36 
Questionplease help...processes in remote server.. minhpc_bk, u dint help me completely, please do Pin
mehnazash23-Jun-06 3:21
mehnazash23-Jun-06 3:21 
AnswerRe: please help...processes in remote server.. minhpc_bk, u dint help me completely, please do [modified] Pin
Colin Angus Mackay23-Jun-06 3:57
Colin Angus Mackay23-Jun-06 3:57 
GeneralRe: please help...processes in remote server.. minhpc_bk, u dint help me completely, please do Pin
Not Active23-Jun-06 4:36
mentorNot Active23-Jun-06 4:36 
GeneralSincere apologies if my message offended or embarrassed anyone Pin
mehnazash25-Jun-06 17:51
mehnazash25-Jun-06 17:51 
QuestionAccess client io ports Pin
ToddNeal23-Jun-06 3:19
ToddNeal23-Jun-06 3:19 

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.