Click here to Skip to main content
15,887,596 members
Home / Discussions / Database
   

Database

 
AnswerRe: Do a simple Query for me Pin
shubhi23-Oct-08 1:56
shubhi23-Oct-08 1:56 
JokeRe: Do a simple Query for me Pin
nelsonpaixao23-Oct-08 15:51
nelsonpaixao23-Oct-08 15:51 
Questionunbound RadioButtonList Selected Item problem Pin
amit201123-Oct-08 1:16
amit201123-Oct-08 1:16 
AnswerRe: unbound RadioButtonList Selected Item problem Pin
Ashfield23-Oct-08 1:29
Ashfield23-Oct-08 1:29 
AnswerRe: unbound RadioButtonList Selected Item problem Pin
John Gathogo23-Oct-08 1:37
John Gathogo23-Oct-08 1:37 
GeneralRe: unbound RadioButtonList Selected Item problem Pin
amit201123-Oct-08 1:52
amit201123-Oct-08 1:52 
GeneralRe: unbound RadioButtonList Selected Item problem Pin
Paddy Boyd23-Oct-08 2:07
Paddy Boyd23-Oct-08 2:07 
GeneralRe: unbound RadioButtonList Selected Item problem Pin
amit201123-Oct-08 3:30
amit201123-Oct-08 3:30 
dear paddy ..
this is my Source Code for the Page--
"<%@ Page Language="C#" AutoEventWireup="true" CodeFile="searchstops_1.aspx.cs" Inherits="searchstops_1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name : Monoblock
Description: A two-column, fixed-width design with dark color scheme.
Version : 1.0
Released : 20080418

-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>DTC_Services</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<script language="javascript" type="text/javascript">
<!--

function content_onclick() {

}

// -->
</script>
</head>
<body>

<form id="form1" runat="server">
<div id="header" style="width: 1202px">
<div id="logo">
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="Black"
Style="z-index: 100; left: 39px; position: absolute; top: 23px" Text="DELHI TRANSPORT CORPORATION"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />
<asp:Image ID="Image2" runat="server" ImageUrl="~/PICS/logo1.gif" Style="z-index: 101;
left: 1014px; position: absolute; top: 31px" />
&nbsp;<br />
&nbsp;
<br />
<!-- end #search -->
<br />
</div>
<!-- end #header -->
<div id="menu" style="width: 1202px">
&nbsp;&nbsp; &nbsp;&nbsp;<br />
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <strong><span style="color: #ffffcc">
<span style="font-size: 14pt; font-family: Verdana"><a href="home.aspx">Home </a>&nbsp;
&nbsp; &nbsp; &nbsp; <a href="home.aspx">Services Offered </a>&nbsp; &nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;<a href="home.aspx">Apply for DTC pass</a> &nbsp; &nbsp; &nbsp;<a href="home.aspx">Contact
Us</a> &nbsp; &nbsp; &nbsp; <a href="home.aspx">Help </a></span><span style="font-size: 14pt">
&nbsp;&nbsp;</span></span></strong></div>
<!-- end #menu -->
<div id="page" style="width: 1121px; height: 635px">
<!-- end #content -->
<div id="sidebar" style="height: 690px">
<ul>
<li>
<h2>
buses at a glance</h2>
<p>
&nbsp;</p>
<p>
&nbsp;</p>
<p>
<asp:Image ID="Image1" runat="server" ImageUrl="~/PICS/2008053054180501.jpg" Style="z-index: 100;
left: 914px; position: absolute; top: 370px" Height="126px" />
&nbsp;&nbsp;</p>
</li>
<li id="calendar">
<h2>
Services offered</h2>
<div id="calendar_wrap">
<br />
&nbsp;<br />
&nbsp; &nbsp;<br />
<br />
<br />
<br />
<br />
<br />
<br />
&nbsp;</div>
</li>
</ul>
</div>
<div style="clear: both;">
<div class="entry">
<asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/home.aspx" Style="z-index: 100;
left: 924px; position: absolute; top: 733px" Width="208px">Buses through a stoppage</asp:HyperLink>
<asp:Panel ID="Panel1" runat="server" Height="691px" Style="z-index: 105; left: 46px;
position: absolute; top: 255px" Width="823px">
<br />
<br />
<span style="font-size: 16pt">Services offered &gt;&gt;<br />
<span style="font-size: 14pt">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Search Buses by Stops<br />
&nbsp;
<asp:Label ID="lblsrc" runat="server" Font-Bold="False" ForeColor="Green" Style="z-index: 100;
left: 580px; position: absolute; top: 300px"></asp:Label>
<asp:Label ID="lbldes" runat="server" Font-Bold="False" ForeColor="Green" Style="z-index: 101;
left: 153px; position: absolute; top: 305px"></asp:Label>
<br />
<asp:Label ID="Label2" runat="server" Font-Italic="True" Font-Size="Smaller" ForeColor="Red"
Style="z-index: 102; left: 348px; position: absolute; top: 128px" Text="You Selected"></asp:Label>
<br />
<span style="font-size: 12pt; color: #ff0000"><em>
<asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Underline="True" Style="z-index: 103;
left: 155px; position: absolute; top: 230px" Text="SOURCE"></asp:Label>
<%--<asp:RadioButtonList ID="RadioButtonList1" runat="server" Style="z-index: 104; left: 344px;
position: absolute; top: 476px" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
</asp:RadioButtonList>--%>
<br />
<br />
<asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Underline="True" Style="z-index: 104;
left: 580px; position: absolute; top: 226px" Text="DESTINATION"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;<br />
<br />
</em></span>
<span style="font-size: 12pt; color: #cc0000"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
<asp:Label ID="Label5" runat="server" Font-Size="Smaller" Style="z-index: 105; left: 264px;
position: absolute; top: 410px" Text="Following Bus Routes are available"></asp:Label>
&nbsp; &nbsp; &nbsp; &nbsp;
<asp:RadioButtonList ID="RadioButtonList1" runat="server" Style="z-index: 106; left: 333px;
position: absolute; top: 467px" AutoPostBack="True" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
</asp:RadioButtonList>
<asp:Label ID="lbltemp" runat="server" Style="z-index: 108; left: 628px; position: absolute;
top: 462px"></asp:Label>
</strong></span></span></span></asp:Panel>
&nbsp; &nbsp;<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
&nbsp;&nbsp;
<asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="~/home.aspx" Style="z-index: 102;
left: 929px; position: absolute; top: 864px" Width="204px">Apply for DTC pass</asp:HyperLink>
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/home.aspx" Style="z-index: 103;
left: 926px; position: absolute; top: 800px" Width="210px">Search by Bus No.</asp:HyperLink>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/home.aspx" Style="z-index: 104;
left: 928px; position: absolute; top: 662px" Width="211px">Search Buses by Stops</asp:HyperLink>
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
</div>
</div>
</div>

<div style="font-size: 0.8em; text-align: center; margin-top: 1.0em; margin-bottom: 1.0em;">
&nbsp;</div>
</form></body>
</html>

"



Here is The CODE SEGMENT

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class searchstops_1 : System.Web.UI.Page
{
SqlConnection con = new SqlConnection();
SqlDataAdapter adp = new SqlDataAdapter();
DataSet ds = new DataSet();

protected void Page_Load(object sender, EventArgs e)
{
con.ConnectionString = ConfigurationManager.ConnectionStrings["dtcConnect"].ConnectionString;
con.Open();
lblsrc.Text = Session["source"].ToString();
lbldes.Text = Session["dest"].ToString();



String str;

str = "select *from busno where exists (select 1 from busroutes bs1 where bs1.busno=busno.buses and bs1.stops='" + Session["source"].ToString() + "') and exists (select 1 from busroutes bs2 where bs2.busno=busno.buses and bs2.stops='" + Session["dest"].ToString() + "')";
adp.SelectCommand = new SqlCommand(str, con);
adp.SelectCommand.ExecuteNonQuery();
adp.Fill(ds, "temp1");

RadioButtonList1.DataSource = ds.Tables["temp1"];
RadioButtonList1.DataTextField = "buses";
RadioButtonList1.DataValueField = "buses";
RadioButtonList1.DataBind();




}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("searchstops.aspx");
}


protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (RadioButtonList1.SelectedIndex != -1)
lbltemp.Text = RadioButtonList1.SelectedItem.Text;
}
}
"

thanx for the help
GeneralRe: unbound RadioButtonList Selected Item problem Pin
amit201123-Oct-08 3:48
amit201123-Oct-08 3:48 
GeneralRe: unbound RadioButtonList Selected Item problem Pin
John Gathogo23-Oct-08 2:20
John Gathogo23-Oct-08 2:20 
Questionhow to read returned identity value from stored procedure Pin
Poonam Gandash23-Oct-08 0:08
Poonam Gandash23-Oct-08 0:08 
AnswerRe: how to read returned identity value from stored procedure Pin
Ashfield23-Oct-08 1:26
Ashfield23-Oct-08 1:26 
GeneralRe: how to read returned identity value from stored procedure Pin
Poonam Gandash23-Oct-08 2:20
Poonam Gandash23-Oct-08 2:20 
GeneralRe: how to read returned identity value from stored procedure Pin
Ashfield23-Oct-08 2:36
Ashfield23-Oct-08 2:36 
AnswerRe: how to read returned identity value from stored procedure Pin
Mycroft Holmes23-Oct-08 11:55
professionalMycroft Holmes23-Oct-08 11:55 
GeneralRe: how to read returned identity value from stored procedure Pin
Poonam Gandash23-Oct-08 19:14
Poonam Gandash23-Oct-08 19:14 
GeneralRe: how to read returned identity value from stored procedure Pin
Mycroft Holmes23-Oct-08 19:43
professionalMycroft Holmes23-Oct-08 19:43 
Questioncan't start sql server service manager [modified] Pin
sathyan_829422-Oct-08 23:37
sathyan_829422-Oct-08 23:37 
AnswerRe: can't start sql server service manager Pin
Ashfield22-Oct-08 23:54
Ashfield22-Oct-08 23:54 
QuestionWhat are the various debug visualizers in visual studio ? Pin
lovedotnet22-Oct-08 18:38
lovedotnet22-Oct-08 18:38 
AnswerRe: What are the various debug visualizers in visual studio ? Pin
John Gathogo23-Oct-08 1:53
John Gathogo23-Oct-08 1:53 
QuestionRollback transaction problem Pin
hdtrung22-Oct-08 17:42
hdtrung22-Oct-08 17:42 
AnswerRe: Rollback transaction problem Pin
Mycroft Holmes22-Oct-08 23:44
professionalMycroft Holmes22-Oct-08 23:44 
GeneralRe: Rollback transaction problem Pin
hdtrung23-Oct-08 4:01
hdtrung23-Oct-08 4:01 
GeneralRe: Rollback transaction problem Pin
Mycroft Holmes23-Oct-08 11:51
professionalMycroft Holmes23-Oct-08 11:51 

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.