|
oskardiazdeleon wrote: How can i force a dayrender on a click event?
You don't have to do that. A DayRender event is raised for every day in every visible calendar, you just have to use it.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guff thanks for the response. I must not be explaining my challenge properly.
It seems to me that the calendars render on load right? I need to be able to control when the calendar renders
protected void slCalendar_DayRender(object sender, DayRenderEventArgs e)
{
//inside here is where i am setting all my dates to blackout based on a dataset
//i am bringing in from the database. My blackout list is created here.
}
This is where the date rendering is happening. What I would like to do is add to the blackout list for the second calendar. How do I dissable cells outside of the sl_Calendar_DayRender?
Thanks
|
|
|
|
|
oskardiazdeleon wrote: It seems to me that the calendars render on load right?
No, as everything else in the page, they render on render.
oskardiazdeleon wrote: I need to be able to control when the calendar renders
In that case you have to pull it out of the page and render it yourself.
oskardiazdeleon wrote: This is where the date rendering is happening. What I would like to do is add to the blackout list for the second calendar. How do I dissable cells outside of the sl_Calendar_DayRender?
You have the data before rendering, right? Why don't you create the list before the rendering, so that you can use it in the DayRender events.
---
single minded; short sighted; long gone;
|
|
|
|
|
My aspx page is trying to connect to a remote server with SQL Server 2000 installed on it, the ip of the server is 172.16.3.111 and the same is the instance of SQL Server, sql server is running in SQL Server Authentication mode, user id is "test" and password is "test123", name of database is myDB,the connection string which I am providing is as follows:
data source=172.16.3.111\172.16.3.111;user id=test;password=test123;initial catalog=myDB;"
But I am getting the following exception:
SQL Server does not exist or access denied.
Can u please tell whats the problem,is the connection string correct,the DBA has also registered me "test" as a user on the SQL server.One thing which I want to mention is that through enterprise manager I can connect and use sql server without any problems,also please note that in VS.NET when I try connecting using server explorer and test the connection than I connect successfully, than why is problem occuring in connecting throug aspx page.
Thanking You.
|
|
|
|
|
The problem might be because of the 2 ip addresses provided which both are the same.
so just provide one ip and then check.
|
|
|
|
|
as per your instructions I provided one ip address but still I am getting the same exception.
|
|
|
|
|
Hi in my dropdown list box i given number of years (1990 to 2225)...,
Same like another dropdown i given jan to dec...,
When the page load in that time it want to show the current year from that dropdown list...,
and similarly another drop down it want to show the current month
How to do that...,
Advance thanks,
Regards,
Magi
|
|
|
|
|
DateTime.Now to get the current year and month, then set them to be selected.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The DateTime.Now property will give u the answer just get the current year n month from that.
|
|
|
|
|
I am using the AJAX tab control on a page and it contains a DropDownList which is populated at runtime. When the page is refreshed at postback, the Dropdownlist is cleared. The Viewstate property is ON for DDL and the page. I am unable to understand why is this happening.
I have tried by putting the DDL outsite the Tabs with no luck.
Working under
Visual studio 2005
Microsoft windows Server2003
|
|
|
|
|
If you always set the datasource for the list, that will reset the selection.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i didnot set any datasource but i am populating it Item by Item just once when the page loads the first time.
It is supposed to retain its contents after each postback.and thats all what i want.
it shows everything as required the first time but nothing after a postback.
Following is the code segment, its written in PageLoad
If Page.IsPostBack = False Then
Dim Datareader As SqlDataReader
Datareader = GetServers(Session("CompanyId"))
Try
While Datareader.Read()
Dim text As String, value As String
value = Datareader("NetworkServerId")
If Not Datareader("ServerName") = "" Then
text = Datareader("ServerIP").ToString + " ( " + Datareader("ServerName").ToString + " )"
Else
text = Datareader("ServerIP").ToString
End If
Dim item As New ListItem(text, value)
DDL_Servers.Items.Add(item)
End While
Datareader.Close()
Catch ex As Exception
If Datareader IsNot Nothing Then
Datareader.Close()
End If
End Try
|
|
|
|
|
OK, that looks like it should work, obviously if you remove the check for postback, you will lose your selection.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
its not the answer of my question, u know it.
i am expecting some help please try to solve my problem or better not bother to reply
|
|
|
|
|
I'm sorry, I didn't realise I had an obligation. It's obvious you've not provided enough info, so I was trying to figure out what the missing issue was, but if you're not happy with that, I'll make a mental note not to bother you in future.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
What the f*** you think he is doing?
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
shahid_isb85 wrote: using the AJAX tab control
This[^] one?
shahid_isb85 wrote: I have tried by putting the DDL outsite the Tabs with no luck.
Which means what? You are still losing dropdownlist's items after postback?
shahid_isb85 wrote: I am unable to understand why is this happening.
Try to find out! If I was you, I'd set up some breakpoints - at least at page_load. You should see then WHAT is happening with your dropdown, and if you still don't understand WHY is it happening, no problem, post it here. Also you can try to comment out as much code as you can (both in codebehind and aspx page) to simplify the problem.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hello Everyone,
Can anybody let me know that wht should i need to do.
Actually i've designed a site and there is "Contact" form in my site but i'm not getting the way to where to store the information filled by a user through my "Contact" form
If i should use email to send the information at a email-id
Then plz let me know how to send email in ASP.NET with c#
Thnx in advance
|
|
|
|
|
Hi Dear
To store values you can use the Database Connectivity the value will stored into sql or access database and to send mail to user you can use theh following code: -
1. To use it you have to import System.Net & System.Net.Mail namespaces.
2. You need to copy the following into web.config file before closing of configuration tag.
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="<from mail id>">
<network
host="mail.dbmindia.com<host server name>"
userName="<from mail id>"
password="<password>"
port="25"
defaultCredentials="true"
/>
</smtp>
</mailSettings>
</system.net>
3. Use this code in your web page to send the mail to any id.
MailMessage mail1 = new MailMessage();
mail1.From = new MailAddress("<from email id>");
try
{
mail1.To.Add(<to mail id>);
}
catch (Exception mailex)
{
Response.Write("Email id is not in valid form");
Response.Write(mailex.ToString());
}
mail1.Subject = "<Subject for the mail";
mail1.IsBodyHtml = true;
mail1.Body = "<body message>"
SmtpClient smtp = new SmtpClient();
smtp.Credentials = new System.Net.NetworkCredential("<from mail id>", "<from mail id's password>");
try
{
smtp.Send(mail1);
}
catch (Exception ex)
{
Response.Write("Failed to send the mail");
Response.Write(ex.ToString());
}
With Regards
Yogesh Agarwal
|
|
|
|
|
Hello I Bind my dropdownlist to datasource
<asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource1"
DataTextField="LocName" DataValueField="LocName" SelectedValue='<%# Bind("myValue") %>'
my problem when myValue is null in DB
give error
how can I solve that ?
aj123
|
|
|
|
|
you can test whether the value is Null before setting the SelectedValue. you can test against System.DBNull.Value
|
|
|
|
|
how can u do that?
In dataSource?
aj123
|
|
|
|
|
I am not a big fan of datasource controls but thats another discussion.You can bind the SelectedValue to a function that takes the value as parameter and test for NULL in it, or you can wire up the ondatabound event...
|
|
|
|
|
Hi friends
In my Update Panel I have one gridview in which I bind three textboxes and three required field validator in ItemTemplate.
I have one button which is placed out of update panel.
On page load event i bind only one row of gridview.
Now i have one link button.
When i click on link button,new row of grid view will be added.
Now my problem is that when I click on Button then requiredfield validators fires only first three textboxes of first row.
They are not fire for adding new rows textboxes.
Can anybody give me right suggestion for this?
Thanks in advance
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Hi Guys,
Can you provide me with xml reference / snippet where it could read, then parse the xml, I tried looking around on the articles but I find them more advance.
Thanks
Dom
|
|
|
|