|
I have tried but not working
( .js code)
if(document.getElementById('+<%txtName.ClientID%>+').value=='')
{
window.alert("Name Feild can not be blank");
return false;
}
Kovuru Sreedhar
|
|
|
|
|
kvsreedhar wrote: I have tried but not working
Yeah.It didn't work. Sorry,I modified my previous post
please don't forget to vote on the post that helped you.
|
|
|
|
|
in place of
document.getElementById("<%=txtName.ClientID%>").focus();
u write
document.getElementById('<%=txtName.ClientID%>').focus();
this will work perfectly.
|
|
|
|
|
thank you for your help and time.
Kovuru Sreedhar
|
|
|
|
|
Hi
i need to import email addresses fm my address book to a website.in the webpage there shud be textboxes for username and password n when we enter the both its needed to display all the mail addresses and names in a label
plz sent the code written ic c# using asp.net....
snt it to rekha8686@gmail.com
Thanx in advance....
Rekha P.Shenoy
|
|
|
|
|
rekhapshenoy86 wrote: i need to import email addresses fm my address book
where is your address book ? Do you want to retreive from Database ?
rekhapshenoy86 wrote: plz sent the code written ic c# using asp.net....
no one will send you code. if you have any doubt you can ask here !!!
cheers,
Abhijit
|
|
|
|
|
Hi friends, Good morning.
I have a bit problem here.My client requirement is that he wants to place two different sites on one server.
Second site should be in one folder with bin folder and web config file also.
I know I have to make that folder as virtual directory but if I move bin folder in that folder then does site work or not?
What I have to do for this?
please don't forget to vote on the post that helped you.
|
|
|
|
|
If you have an IIS or any other webserver running, then you can place as many sites as you want to..
Try placing this second site as well (create a virtual directory also) and it will work like a Charm..
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Thanks for your response.
I have one site on root and second site in "second" folder.I have placed Bin,App_Data and web config file of second site in second folder.I have made it virtual directory also.Now when I access this,it gives me an error that "Server Application Unavailable".
please don't forget to vote on the post that helped you.
|
|
|
|
|
Always use Publish Folder to Deploy in IIS .
Imran Khan Pathan wrote: it gives me an error that "Server Application Unavailable".
Just delete the Virtual Directory, Reset IIS and again Create the VDir Hope will resolve your problem.
cheers,
Abhijit
|
|
|
|
|
I have another question.
for single site,If I deploy site(with bin,app_data and web config file) in folder and I make it virtual directory then it will work?
Nothing on root folder,All folders and files are in one folder.
I have tried it but it gives enterprice library namespace error because bin folder also in folder.
please don't forget to vote on the post that helped you.
|
|
|
|
|
In IIS you can put multiple Virtual Directory.
Don't copy all folder sepatrately. Just Publish the WebSite from VS the use the folder as Virtual Directory.
cheers,
Abhijit
|
|
|
|
|
When single natting was done to my website, everything was working fine but after doing double natting (NAT-Network address translation) the path of the webresource .axd changes and no javascript is accessible. Has anybody faced this problem?
this is the link of my home page:
http://10.1.45.3/alistest/PVN_POC/pages/Home.aspx
and this is the source of webresource.axd file:
http://10.1.45.3/PVN_POC/Webresource.axd?XXXXX
Error:
Virtual folder name is not coming in the source of webresource.axd
|
|
|
|
|
Hello,
Is there a server side event which will execute if the user leaves the page [like on click of hyperlink ]. Like. If the user is on page cart.aspx and he leave to product.aspx. Can I execute a event on cart.aspx.cs. The reason being I want to set a session value from a textbox, when a user leave the page. I am asking for this event because this will set the seesion and there will not be a Postback as opposed to onBlur event.
I am not interested inusing javascript on the page. Please suggest.
Regards,
Pavas
Regards,
Pavas
|
|
|
|
|
|
I have notcied that when a user clik a link the page_unload event do not fires and it goes to the other page
Regards,
Pavas
|
|
|
|
|
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>
|
|
|
|
|
jrahma wrote: protected void Page_Load(object sender, EventArgs e)
{
GetHomeSlides();
}
So, you call GetHomeSlides, which builds and returns an ArrayList of URLs, but then you don't do anything with them. You effectively throw away the results. Perhaps you should assign the result of the method to something.
Oh... and this code:
jrahma wrote: catch (Exception)
{
throw;
}
Nice... What exactly does that do? (Yes, I know the answer, I want you to think about it)
|
|
|
|
|
I have two horizontal ads on my web page beside each other and i want to retrieve two ads to diplay there from my ads.xml using the AdRotator? is it possible to handle both the same time or it has to be handeled speratelly?
|
|
|
|
|
I have an GridView listing events and i want to hide the following events:
Evsnts where date > Today
Evants where date < Current Months
with an option to collapse or expand?
something just like this:
<a href="http://www.ahlanbahrain.com/temp/gridview.jpg">http:
how can i do that?
|
|
|
|
|
Hi,
Bind all your data to a DataList control. And keep an identification on a HiddenField to identify the row of the above condition is true.
<asp:DataList ID="DataList1" runat="server" OnItemDataBound="DataList1_ItemDataBound">
<ItemTemplate>
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Title") %>'></asp:Label>
<cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" ExpandControlID="Label1"
CollapseControlID="Label1" TargetControlID="Panel1">
</cc1:CollapsiblePanelExtender>
<asp:Panel ID="Panel1" runat="server">
<asp:Label ID="Label2" runat="server" Text='<%#Eval("Description") %>'></asp:Label>
</asp:Panel>
</ItemTemplate>
</asp:DataList>
On DataList1_ItemDataBound use the FindControl method to locate the HiddenValue and set the required panel collapse and expand as for the requirement. Or with out binding the details you could bind it at the time of selection of the title and expand it.
Hope it helps
Thx,
Gayani
|
|
|
|
|
Hi all,
Im using VS 2003 for my small application, and there im using repeater control, there i need check each row in repeater control is there any web url is in data content, and if there any web url i need to set different color for that particular row, im bit stuck of that, pls help me to do this
Thank you.
|
|
|
|
|
You can iterate rows in the repeater control. Regular expression can be used to check whether the data has a URL. Check this[^] which has regular expression examples (not checked whether it has a regex for URL). Changing the color will be trivial.
|
|
|
|
|
I want to design a web for online shopping.I don't want to use login controls.I want to use session for users.when a user add an item to shopping cart how can i use session to save the items in shopping cart without saving in database?I don't want to use cache.I use a class for shoppingcart.when a user add item to it's shoppingcart I don't want to go to the page of the shoppingcart.
|
|
|
|
|
bbc_sh wrote: I want to use session for users.when a user add an item to shopping cart how can i use session to save the items in shopping cart without saving in database?I don't want to use cache
Okay, it says you don't have much idea about what session and cache is. BTW, keeping shopping cart items in session is not a good idea. I'd create a table something named "shopping" in the database and keep the items there which can be accessed using the session id.
Keeping items to session is trivial. Say you have a product class named "Product". Then you can keep a generic List<Product> instance in the session which represents shopping cart items. To add items,
List<Product> shoppingCart = Session["ShoppingCart"] as List<Product> ;
shoppingCart.Add(new Product());
bbc_sh wrote: I don't want to go to the page of the shoppingcart.
If you don't want to move to shopping cart page, just don't redirect after adding item.
|
|
|
|