|
Thank You, I will try.
Thanks & Regards,
Radha
|
|
|
|
|
hi all ,
I want have one confirmation box with Yes and No button with default focus is on No.
1.I have tried with Windows.confirm(), but the focus cannot be changed default to NO it seems.
2. I cannot use MessageBox because it is c# website and we use publish code in which messagebox dont work.
I need this very very urgently plssss help
Thanks in advance
Sampad
|
|
|
|
|
Hi friends,
I there anyway to stop the popout calendae from closing when i click next/prev month? Following is my code(taken from ASP.NET 2.0 unleashed):
==========================================================================
]]>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void calEventDate_SelectionChanged(object sender, EventArgs e)
{
txtEventDate.Text = calEventDate.SelectedDate.ToString("d");
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
lblResult.Text = "You picked: " + txtEventDate.Text;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<script type="text/javascript">
function displayCalendar()
{
var datePicker = document.getElementById('datePicker');
datePicker.style.display = 'block';
}
</script>
<style type="text/css">
#datePicker
{
display:none;
position:absolute;
border:solid 2px black;
background-color:white;
}
.content
{
width:400px;
background-color:white;
margin:auto;
padding:10px;
}
html
{
background-color:silver;
}
</style>
<title>Calendar with JavaScript</title>
</head>
<body>
<form id="form1" runat="server">
<div class="content">
<asp:Label
id="lblEventDate"
Text="Event Date:"
AssociatedControlID="txtEventDate"
Runat="server" />
<asp:TextBox
id="txtEventDate"
Runat="server" />
<img src="Calendar.gif" onclick="displayCalendar()" id="IMG1" />
<div id="datePicker">
<asp:Calendar
id="calEventDate"
OnSelectionChanged="calEventDate_SelectionChanged"
Runat="server" />
</div>
<br />
<asp:Button
id="btnSubmit"
Text="Submit"
Runat="server" OnClick="btnSubmit_Click" />
<hr />
<asp:Label
id="lblResult"
Runat="server" />
</div>
</form>
</body>
</html>
==========================================================================
Thanks
lene
|
|
|
|
|
Not sure if you've Already resolved your problem but this is what I did to my calendar. Basically, you need to catch another event in your calendar: OnVisibleMonthChanged
Calendar.aspx
<br />
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Calendar.aspx.cs" Inherits="Calendar" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server"><br />
<title></title><br />
</head><br />
<body><br />
<form id="form1" method="post" runat="server"><br />
<asp:TextBox ID="txtDate" runat="server" Width="220px"></asp:TextBox><br />
<asp:Button ID="btnCalendar" runat="server" OnClick="btnCalendar_Click" Text="...." /><br />
<br /><br />
<asp:Calendar ID="cdrDate" runat="server" SelectionMode="Day" BorderWidth="1px" BackColor="White"<br />
Width="220px" DayNameFormat="FirstLetter" ForeColor="Purple" Height="200px" Font-Size="8pt"<br />
Font-Names="Verdana" BorderColor="Black" ShowGridLines="True" OnVisibleMonthChanged="cdrDate_MonthChanged"<br />
OnSelectionChanged="cdrDate_SelectionChanged"><br />
<TodayDayStyle ForeColor="Black" BackColor="Beige"></TodayDayStyle><br />
<WeekendDayStyle BackColor="LightGoldenrodYellow"></WeekendDayStyle><br />
<SelectorStyle BackColor="Black"></SelectorStyle><br />
<NextPrevStyle Font-Size="9pt" ForeColor="White"></NextPrevStyle><br />
<DayHeaderStyle Height="1px" BackColor="LightGoldenrodYellow"></DayHeaderStyle><br />
<SelectedDayStyle Font-Bold="True" BackColor="Gray"></SelectedDayStyle><br />
<TitleStyle Font-Size="9pt" Font-Bold="True" ForeColor="White" BackColor="Gray"><br />
</TitleStyle><br />
<OtherMonthDayStyle ForeColor="Gray"></OtherMonthDayStyle><br />
</asp:Calendar><br />
</form><br />
</body><br />
</html><br />
<br />
<br />
Calendar.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Calendar : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
txtDate.Enabled = false;
cdrDate.Visible = false;
}
protected void btnCalendar_Click(object sender, EventArgs e)
{
if (txtDate.Text.Trim() != "")
cdrDate.SelectedDate = Convert.ToDateTime(txtDate.Text);
cdrDate.Visible = true;
}
public void cdrDate_MonthChanged(object sender, MonthChangedEventArgs e)
{
cdrDate.Visible = true;
}
protected void cdrDate_SelectionChanged(object sender, EventArgs e)
{
txtDate.Text = cdrDate.SelectedDate.ToString("yyyy-MM-dd");
cdrDate.Visible = false;
}
}
Hope that help
|
|
|
|
|
Hi i try to send one mail with attachment...,
But its sending except c drive file attachments...,
Y its not accepting c drive files
plz any one help me,
This is my code:
Sub mailsend()
Dim objMail As New MailMessage
Dim objAttach As MailAttachment
Dim objConn As SmtpMail
Dim postedFile = fileUpload.PostedFile
Dim strPath As String = ""
Try
strPath = Path.GetFullPath(postedFile.FileName)
Catch
End Try
objMail.From = ddlAprroveId.SelectedItem.Text
objMail.To = ddlAprroveId.SelectedItem.Text
objMail.Subject = "Travel Expense Statement From " & ddlTrEmpId.SelectedItem.Text
objMail.Body = "At " + DateTime.Now + "
" & _
". Plz Find the attachment in this mail " & _
"send by " & ddlTrEmpId.SelectedItem.Text & "." & vbCrLf & vbCrLf & _
"---------------------------------------" & vbCrLf & vbCrLf & _
txtTotalExp.Text & vbCrLf
objMail.Priority = MailPriority.High
Try
objAttach = New MailAttachment(strPath)
objMail.Attachments.Add(objAttach)
Catch
End Try
objConn.Send(objMail)
End Sub
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
What is the error you are getting?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
i am not getting any error its not attaching the file,
while send,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
You have use exception escaping with a blank catch statement. Remove your try-catch and you will get exception.
|
|
|
|
|
Hi Friends,
Forms Authentication in .NET framework is very useful utility. But I have a feeling that only ASPNETDB database structure would not help me.
Is there a way to use Forms Authentication with my own database?
|
|
|
|
|
Here[^] is a similar discussion.
|
|
|
|
|
Hi Guys
Need help here. I am using asp.net in 2005 with IIS 6.0. During my testing phase i have no problem generating Excel from data. However when the data grow, everytime i generate a large amount of data , the system prompt error or hang there
Any ideas on how to improve the application or resolve the issue?
This is the error msg:
Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
Thanks A Million Guys
You guys are life saviour!!!!!!
KaKaShi HaTaKe
|
|
|
|
|
I am a new asp.net developer. I am trying to come up with a game which is to be opened in the browser and the client has to play it.
My problem is to move an image on the web form. I had the timer control configured but i am unable to get the location of image to move on the timer tick.
When i have done it in Window forms in VB i have a picture box and i have the location attribute for it which i have used to move.
But in ASP.NET web forms i dont have picture box. Could you guys help me out to get to a solution.
Is there a possibility to write user control of picture box or take it from VB in asp.net
I would really appreciate any advise on how to tackle the problem
|
|
|
|
|
|
Hello,
how can i set default button of a ASP.NET webpage with C# code?
We set default button of a windows application Form as
this.AcceptButton = btnShow;
i want like this. but for a webpage.
Please reply..
THANK YOU
Dipak
|
|
|
|
|
In 2.0 and up...
Drop an asp:panel control on your page.
Each panel control has a Default Button Property.
I didn't get any requirements for the signature
|
|
|
|
|
form1.DefaultButton = btnShow;
|
|
|
|
|
simply write defaultbutton="button name" in form tag.
this will work as default button on the page.
|
|
|
|
|
Hi all,
In my application, we are generating an excel file which will have 5000+ records with 50 columns. If i check the LIVE SERVER the file was generated, but since the code took around 15 to 20 minutes to generate the file, the connection between CLIENT and SERVER has got "timed out".
It is displaying "Page cannot be displayed" error is coming.
Can any body help me to keep the Client and Server alive, even if the server took some time to generate the excel file. just like sending response from server at regular intervals..
thanks in advance...
eswar.
|
|
|
|
|
I think you need to be creative. If your server is taking that long, you are probably doing something wrong. I would look into using an export function form Crystal, SQL Reports or another 3rd party company rather than opening an instance of Excel on your server.
But, if you must...
Add the following to the web.config. I think it goes under the system node.
<br />
httpruntime executionTimeout="3600" <br />
<br />
/httpruntime <br />
<br />
Edit added the code formatting. It still didn't display correctly. But you get idea, I hope.
I didn't get any requirements for the signature
modified on Wednesday, January 23, 2008 11:01:26 AM
|
|
|
|
|
hi;
I wanna create new items acording to database .i add them in a panel but cant access data which user select.How can i acces it?i wanna take all data whit 1 button click as well
..create much dropdown
DropDownList Mydrop= new DropDownList();
Mydrop.ID = "Mydrop" + namedatavalue;
...fill whit dataset dropdowns
Mydrop.DataSource = xdataset.Tables["xlol"];
Mydrop.DataTextField ="namefield";
Mydrop.DataValueField = "namevalue";
Mydrop.DataBind();
Mydrop.Width=100;
con.Close();
Mydrop.Items.Insert(0, "--Choose--");
Mydrop.AutoPostBack = true;
dropportfoyekle.SelectedIndexChanged += new EventHandler(deneme_SelectedIndexChanged);
...i try put 1 static dropdown and use its spec but cant work cause them not public
Panel1.Controls.Add(dropportfoyekle);
ty
|
|
|
|
|
Hi i have a string like this:
mickey - mick@gmail.com
now i want to separate those like:
one string = mickey
and another one = mick@gmail.com
how to find that - symbol between that ?,
plz give me some idea
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
HMagesh wrote: find
indexOf
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
string original = "mickey - mick@gmail.com";
string[] parts = original.Split('-');
string name = parts[0].Trim();
string email = parts[1].Trim();
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Buggers. You clearly type quicker.
We violated nature and our children have to pay the penalty
Don't go near the water children... Johnny Cash - 1974
|
|
|
|
|
string myString = "mickey - mick@gmail.com";
char delimiter = '-';
string[] bits = myString.Split(delimiter);
Console.WriteLine("Name:{0}, Email Address:{1}", bits[0].Trim(), bits[1].Trim());
We violated nature and our children have to pay the penalty
Don't go near the water children... Johnny Cash - 1974
|
|
|
|