|
i want to display the next month in the calendar but because i have written the code like "calendar1.visible =false" in the "Calendar1_SelectionChanged1" method i am unable to perform the above mentioned operation. how can i display the next month
|
|
|
|
|
Calendar1.Date = new DateTime(<br />
int.Parse(DateTime.Now.ToString("yyyy")),<br />
int.Parse(DateTime.Now.ToString("MM"))+1,<br />
int.Parse(DateTime.Now.ToString("dd")));
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
it is showing an error like "'System.Web.UI.WebControls.Calendar' does not contain a definition for 'Date' and no extension method 'Date' accepting a first argument of type 'System.Web.UI.WebControls.Calendar' could be found (are you missing a using directive or an assembly reference?)"
|
|
|
|
|
You can use like this,
Calendar1.VisibleDate = DateTime.Today.AddMonths(1);
|
|
|
|
|
I am facing an output error.
I am using a drop downlist which contains two items called "half day" and "full day" and two calendar controls.
What i am in need is when i select the "full day" first it should show calendar1, after selecting the date in calendar1 it should display the next calendar control. then when i select the "half day". it should display only calendar1 and once clicking the date in the calendar1 the same should not be visible.
Anyone kindly help me...
modified on Saturday, May 30, 2009 6:40 AM
|
|
|
|
|
First,enable autopostback of DropDownlist,set
AutoPostBack=true;
On
SelectedIndexChange of dropdownlist set visible to controls.
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Calendar1.Visible=true;
}
and in event
SelectionChanged of Calendar1 check which items is selected from DropDownList
private void Calendar1_SelectionChanged(object sender, System.EventArgs e)
{
if(DropDownList1.Text =="full day")
{
Calendar2.Visible=true;
}
else
{
Calendar2.Visible=false;
}
}
Hope this will help you.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
thank you the mistake was enabling the auto post back
|
|
|
|
|
You are welcome.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
hi,
i have code as below to populate treeview. it works fine. and it populates as i want.
i have one button to edit treeview node text.that is also work fine.
the code to edit treeview node text as given last below.
i want that, when i edit treeview node text,after clicking button,the same treeview node expanded with new text of treeview.
how can i get this ??
Regards,
ASIF
Private Sub PopulateTree(Optional ByVal depth As Integer = 1)
'Populate the tree based on the subfolders of the specified VirtualImageRoot
Dim rootFolder As New DirectoryInfo(Server.MapPath(VirtualImageRoot))
Dim root As TreeNode = AddNodeAndDescendent("0", Nothing)
'Add the root to the TreeView
TvFile.Nodes.Add(root)
End Sub
Private Function AddNodeAndDescendent(ByVal val As String, ByVal parentNode As TreeNode) As TreeNode
Dim virtualFolderPath As String
ds = New DataSet()
If parentNode Is Nothing Then
virtualFolderPath = VirtualImageRoot
ds = ClsFileapp.GetRootFolder()
Else
ds = ClsFileapp.GetRootFolder(val)
virtualFolderPath = parentNode.Value & val & "/"
End If
Dim node As New TreeNode(ClsFileapp.GetfolderName(val), val)
node.ImageUrl = "images/folder.gif"
node.ToolTip = ClsFileapp.GetfolderName(val)
Dim reader As IDataReader = ds.CreateDataReader
While reader.Read()
Dim child As TreeNode = AddNodeAndDescendent(reader("id").ToString(), node)
child.SelectAction = TreeNodeSelectAction.Select
child.PopulateOnDemand = False
node.ChildNodes.Add(child)
End While
Return node
End Function
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
imgDeleteFolder.Attributes("onClick") = "if (! confirm('are you sure to delete')) return false;"
If Not IsPostBack Then
PopulateTree()
TvFile.ExpandDepth = 1
PnlRename.Style("display") = "none"
ModalPopupExtender1.Hide()
End If
End sub
Protected Sub btnEdit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnFolderRename.Click
If Session("SubID") IsNot Nothing Then
If txtRenameFolder.Text <> "" Then
ClsFileapp.RenameFolderName(Session("SubID").ToString(), txtRenameFolder.Text)
Dim strpath As String = Session("PathValue").ToString()
Dim currentDepth As String() = strpath.Split("/")
TvFile.Nodes.Clear()
PopulateTree()
TvFile.FindNode(strpath).Selected = True
TvFile.FindNode(strpath).Expanded = True
TvFile.SelectedNodeStyle.BackColor = Drawing.Color.FromName("#829cb0")
TvFile.SelectedNodeStyle.ForeColor = Drawing.Color.White
Else
ModalPopUpRenameFolder()
lblRenameFolder.Visible = True
End If
End If
End Sub
|
|
|
|
|
Hi.
Can It possible to show a web page content as a an Thumbnails or image(such as Firefox add-on)?
sepel
|
|
|
|
|
There are already many services providing this feature. Check this [^]out
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thank Manas.
I find Some Code sample?
sepel
|
|
|
|
|
|
Hi friend,
I want to know how to connect sql server 2005 when i am working on another
pc in (XP).
|
|
|
|
|
Hi
To connect to remote system use this connection string
"Data Source=IPAddressOfRemoteSystem,1440;Initial Catalog=YourDB;User ID=uid;Password=pwd;
Ramesh Sambari
Knowledge is like honey.
Collect it, to make life sweet.
|
|
|
|
|
There is something called ConnectionString[^]
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
for the database to connect you may have used windows or sql authentication if it is sql authentication connect with the help of the computername and password ie.administrator username and password in the connection string. i think that will do.
|
|
|
|
|
you can write the connection string in web.config file and use these connection abject in any where in your project.
like
<add key="ConnectionString" value="server=IP\SQLEXPRESS;Initial Catalog=dbname;uid = userid; pwd = pwd;">
and use like this in your form
string strSqlCon = ConfigurationSettings.AppSettings["ConnectionString"];
|
|
|
|
|
Hi,
The following command gave me the script for creating membership system
aspnet_regsql.exe -E -S {server} -d {database} -A all -sqlexportonly c:\script.sql
when i execute script.sql, i get the following message
"Cannot grant, deny, or revoke permissions to sa, dbo, information_schema, sys, or yourself"
i have been working using windows authentication... Is it fine?
Thanks,
NetQuestions
modified on Saturday, May 30, 2009 6:29 AM
|
|
|
|
|
The following is my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<%--method 1--%>
<div>
<EMBED src="Flash/123.flv" style="HEIGHT: 331px; LEFT: 83px; TOP: 171px; WIDTH: 538px">
</div>
<%--method 2--%>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="150" height="280">
<param name="movie" value="Flash/123.flv">
<param name="quality" value="high">
<embed src="Flash/123.flv" width="150" height="280" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ></embed>
</object>
</div>
</form>
</body>
</html>
after run, only display a rectangle. I am sure,the path is right.
modified on Saturday, May 30, 2009 4:05 AM
|
|
|
|
|
jason_mf wrote: 123.flv
This is no ASP.Net question.
BTW, it should be a swf file and not flv.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
but I use swf replaced was failed too.
still display a rectangle region.
has need any config or setting?
or only wrote "object" html tag?
|
|
|
|
|
i have some question with regards to n-tier applications:
1. How do i design a layer?
--is it created in the App_code folder?
or is it a separate class library?
2. What is the design in layer application?
Thanks
|
|
|
|
|
you have to create a seperate class library then only you will get the DLL seperately and which can be modified with no modifications to your web project.
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
Rolando Y. Puno wrote: How do i design a layer?
Depends what they layer does.
Rolando Y. Puno wrote: is it created in the App_code folder? or is it a separate class library?
It can be, but that is an implementatin detail, not a design detail. Typically, however you'd put each layer in its own class library. That way it is portable and can be reused elsewhere.
Rolando Y. Puno wrote: What is the design in layer application?
I don't know what you mean by "design in layer application".
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|