Click here to Skip to main content
15,923,910 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Place two site on one server Pin
Abhijit Jana3-Aug-08 20:55
professionalAbhijit Jana3-Aug-08 20:55 
QuestionRe: Place two site on one server Pin
Imran Khan Pathan3-Aug-08 20:00
Imran Khan Pathan3-Aug-08 20:00 
AnswerRe: Place two site on one server Pin
Abhijit Jana3-Aug-08 20:53
professionalAbhijit Jana3-Aug-08 20:53 
QuestionPath of webresource.axd changed after Doing double natting of the hosted website... Pin
amit.jha3-Aug-08 18:57
amit.jha3-Aug-08 18:57 
QuestionEvent when a user leaves the page Pin
mpavas3-Aug-08 18:26
mpavas3-Aug-08 18:26 
AnswerRe: Event when a user leaves the page Pin
Sam Xavier3-Aug-08 19:34
Sam Xavier3-Aug-08 19:34 
GeneralRe: Event when a user leaves the page Pin
mpavas3-Aug-08 21:01
mpavas3-Aug-08 21:01 
QuestionSlideShow from SQL Server database Pin
Jassim Rahma3-Aug-08 10:28
Jassim Rahma3-Aug-08 10:28 
I am using this code to read images from a database and display in SlideShow availabe in the AJAX Tookit. I am not getting any error but I am not getting any image display though i have set the path and i have images there in the folder..

can u plz help..

THIS IS THE C# CODE:
using System;
using System.Configuration;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page
{
SqlConnection sql_connection = null;
SqlCommand sql_command = null;
// SqlDataAdapter sql_adapter = null;
SqlDataReader sql_reader = null;
// DataSet data_set = null;

[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public ArrayList GetHomeSlides()
{
ArrayList slides_array = new ArrayList();

sql_connection = new SqlConnection("Data Source=.\\SQLEXPRESS;initial catalog=jassimrahma.com;integrated security=true");
sql_connection.Open();
sql_command = new SqlCommand("sp_get_home_slides", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
try
{
sql_reader = sql_command.ExecuteReader();

while (sql_reader.Read())
{
slides_array.Add("http://localhost:49163/JassimRahma.com/gallery/" + sql_reader["photo_file"].ToString()); // Please make sure the format of imgurl is correct.
}

sql_reader.Close();
}
catch (Exception)
{
throw;
}
finally
{
sql_connection.Close();
}

return slides_array;
}

protected void Page_Load(object sender, EventArgs e)
{
GetHomeSlides();
}
}



THIS IS THE ASP.NET CODDE:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register TagPrefix="ucl" TagName="ucl_website_menu" Src="~/website_menu.ascx" %>
<%@ Register TagPrefix="ucl" TagName="ucl_website_header" Src="~/website_header.ascx" %>
<%@ Register TagPrefix="ucl" TagName="ucl_website_recent_images" Src="~/website_recent_images.ascx" %>
<%@ Register TagPrefix="ucl" TagName="ucl_website_latest_articles" Src="~/website_latest_articles.ascx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html id="Html1" xmlns="http://www.w3.org/1999/xhtml" runat="server" dir="rtl" lang="ar-bh" >
<head id="Head1" runat="server" dir="rtl" lang="ar-bh">
<link href="website_stylesheet.css" rel="Stylesheet" type="text/css"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="keywords" content="البحرين, مملكة البحرين, المناسبات, زواج, تأبين, أخبار, خبر, احتفال, مهرجان, ندوة, المنامة, " />
<meta name="Description" content="جميع المناسبات والفعاليات في مملكة البحرين بين يديك" />
<meta http-equiv="expires" content="-1" />
<meta name="robots" content="INDEX,FOLLOW" />
<title>JassimRahma.com</title>
</head>
<body id="Body1" runat="server" dir="rtl" lang="ar-bh" style="margin: 2" >
<form id="form1" runat="server">
<div>
<ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" />
<asp:Table runat="server" HorizontalAlign="Center" Width="775" CssClass="" CellPadding="0" CellSpacing="0">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<ucl:ucl_website_menu ID="Ucl_website_menu" runat="server" /><br /><ucl:ucl_website_header ID="Ucl_website_header" runat="server" />
<asp:Table runat="server" Width="778" CellPadding="0" CellSpacing="0" BorderColor="Transparent" BorderStyle="None" BorderWidth="0">
<asp:TableRow>
<asp:TableCell HorizontalAlign="Right" VerticalAlign="Middle" CssClass="titelcell"><strong>من ألبوم الصور :</strong></asp:TableCell>
<asp:TableCell HorizontalAlign="Right" VerticalAlign="Middle" CssClass="separatorcell"></asp:TableCell>
<asp:TableCell Width="200" HorizontalAlign="Right" VerticalAlign="Middle" CssClass="titelcell"><strong>مواقع مفيدة :</strong></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell ColumnSpan="3"><br /></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell HorizontalAlign="Right" VerticalAlign="Top">
<asp:Image ID="Image1" Width="500" Height="500" runat="server" />
<ajaxToolkit:SlideShowExtender ID="SlideShowGallery" runat="server" PlayInterval="3000"
TargetControlID="Image1"
SlideShowServiceMethod="GetHomeSlides"
AutoPlay="true"
Loop="true" />
</asp:TableCell>
<asp:TableCell HorizontalAlign="Right" VerticalAlign="Top"></asp:TableCell>
<asp:TableCell Width="200" HorizontalAlign="Center" VerticalAlign="Top" CssClass="separatorcell" BorderColor="Black" BorderStyle="Solid" BorderWidth="1">
<asp:Image ID="Image2" ImageUrl="~/links/bahrain_egov.jpg" runat="server" /><br /><br />
<asp:Image ID="Image3" ImageUrl="~/links/on_10_net.jpg" runat="server" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<br />
<ucl:ucl_website_latest_articles ID="ucl_website_latest_articles" runat="server" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</form>
</body>
</html>
AnswerRe: SlideShow from SQL Server database Pin
Colin Angus Mackay3-Aug-08 13:48
Colin Angus Mackay3-Aug-08 13:48 
Questionmultiple ads using adrotator Pin
Jassim Rahma3-Aug-08 10:22
Jassim Rahma3-Aug-08 10:22 
QuestionCollapsible GridView Rows Pin
Jassim Rahma3-Aug-08 10:20
Jassim Rahma3-Aug-08 10:20 
AnswerRe: Collapsible GridView Rows Pin
Gayani Devapriya4-Aug-08 3:29
Gayani Devapriya4-Aug-08 3:29 
QuestionIdentify the web url name Pin
slSoftware3-Aug-08 7:34
slSoftware3-Aug-08 7:34 
AnswerRe: Identify the web url name Pin
N a v a n e e t h3-Aug-08 8:04
N a v a n e e t h3-Aug-08 8:04 
Questionshoppingcart without asp.net llogin control Pin
strawberrysh3-Aug-08 7:23
strawberrysh3-Aug-08 7:23 
AnswerRe: shoppingcart without asp.net llogin control Pin
N a v a n e e t h3-Aug-08 8:12
N a v a n e e t h3-Aug-08 8:12 
GeneralRe: shoppingcart without asp.net llogin control Pin
strawberrysh3-Aug-08 8:31
strawberrysh3-Aug-08 8:31 
QuestionForms authentication and session question Pin
kensai3-Aug-08 3:17
kensai3-Aug-08 3:17 
AnswerRe: Forms authentication and session question Pin
Abhijit Jana3-Aug-08 3:31
professionalAbhijit Jana3-Aug-08 3:31 
QuestionLOCK/UNLOCK mechanism for particular record Pin
Karan_TN3-Aug-08 1:03
Karan_TN3-Aug-08 1:03 
AnswerRe: LOCK/UNLOCK mechanism for particular record Pin
Sam Xavier3-Aug-08 19:38
Sam Xavier3-Aug-08 19:38 
GeneralRe: LOCK/UNLOCK mechanism for particular record Pin
Karan_TN3-Aug-08 23:10
Karan_TN3-Aug-08 23:10 
QuestionServer.MapPath .. just curious? Pin
Blumen3-Aug-08 0:03
Blumen3-Aug-08 0:03 
QuestionRe: Server.MapPath .. just curious? Pin
Abhijit Jana3-Aug-08 1:29
professionalAbhijit Jana3-Aug-08 1:29 
AnswerRe: Server.MapPath .. just curious? Pin
Blumen3-Aug-08 2:26
Blumen3-Aug-08 2:26 

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.