asp.net 2.0 question

  • Thread starter Thread starter new coder
  • Start date Start date
N

new coder

I'm creating a web app in .net 2005, on the form I allow users to do a
search based on the information they selected, then click a button then a
grid is populated. So my question is the person that i'm creating this app
for wants no code behind, so how can I have the button populate the grid and
pass in the search parameters, without using code behind?
 
Hi

There is one model of programming ASp.NET web pages called INLine Model.

What we do here is, instead of havig a separate file as a code behid we
write the logic inside the asps file only but in a SCRIPT block which runs at
server.

Have a look at the following example :

<html>
<head>

<script language="C#" runat="server">

void Page_Load(object Source, EventArgs e) {
Label1.Text="You clicked the button";
}

void Button1_Click(object Source, EventArgs e) {
Label1.Text="You clicked the button";
}

</script>

</head>
<body>

<h3><font face="Verdana">PostBack Using Button</font></h3>

<form runat=server>

<asp:Button id=Button1 Text="Click Me" onclick="Button1_Click"
runat="server" />

<asp:Label id=Label1 runat=server />

</form>

</body>
</html>

What this page is doing is, it has a button and a label. When you click the
button it populates the label with a message.

Hope this answers your question ! ! !
 
with the INLine Model in 2.0 how will I show the datagrid when the button is
clicked?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top