0

Hello Experts,

First of all I don't know if i am on the right track.If I am not please suggest your best,easy options :)

What I am trying to do is the following.

I have a web page which is included with textboxes
I have also a database inside there is the following informations

Devices   Feature1 Feature2
Device1    10         15000
Device2    15         12000

Ok Feature1 input will be the

TextBox1.Text

Feature2 input will be the

TextBox2.Text

input

For Example user will write 12 to the textbox1 and will click to "calculate" button
Output will be transforming the label into Result is Device2 text because the number is less then Feature1 in device2

I have tried with gridview but i am totally lost, how i will do that ? I will be needed also a loop for showing each possible device in the result. For example if 9 is written inside TextBox1 the output label should show Device1 and Device2 :)

Waiting your precious responses :)

2
Contributors
3
Replies
15
Views
3 Years
Discussion Span
Last Post by alpdoruk
1

I have got your point you basically want to filter the results on basis of textbox.First of all if you are using list binding this it is very simple
on calculate just write some function like

gridView.DataSource=lst.where(x->x.Feature1>int.parse(TextBox1.Text)).ToList();
gridView.DataBind();

Hope it helps

Edited by wasimmalik

0
 gridview.visible =false 

on page load

 gridview.visible=true

on button click solved the problem

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.