|
Member 4755319 wrote: because it (cell) is created in usercontrol.
Have you checked the page source ? Verify the alert is giving the same name which is there in the page source.
|
|
|
|
|
Thanks Navaneeth, Finally i got the answer by ur clue, i saw the page source it was different from the id. It includes usercontrolname_id.
Now my user control is working fine.... Thanks alot..
|
|
|
|
|
Hi all,
iam generating a report and binding it to a grid view. This grid contain too many reports. When iam using window.print the whole report is printed on 1 page with a very very tiny font. while i want the report to go on second and third page etc... if it has too many columns in it.
thanks
|
|
|
|
|
Hi dears,
I have a website with ASP.NET 2.0
in my website each user has an album that can upload her photos on it.
User should be able to delete images(my website i s hosted on my dedicated server).But its impossible. I did grant delete access for aspnet user to PhotoAlbum directory on server, but I can`t delete any file.
the aspnet user in server is member of users group not administrators group.
I want to know how can I fix this problem ?!
thx for your help,
www.behzadi.net
|
|
|
|
|
Try impersonating user before you delete and undo the impersonation after you are done. Check this[^] MSDN article for getting an idea on this.
|
|
|
|
|
i have a girdview inside a panel, i have include css
.TblHeaderFixed { position:relative; }
in GridView i have inclued as shown
HeaderStyle-CssClass="TblHeaderFixed"
i find the header fixed but it creeps out of the div or panel in which the grid is placed. The DataRow of the grid however remains within the div. but only the header is out. Kindly help...
ranji varghese
|
|
|
|
|
hi friends
this is my code for check the system LAN connected or not
Dim server As String = "207.46.134.222"
Try
Dim hostInfo As IPHostEntry = Dns.GetHostByAddress(server)
Catch ex As Exception
Response.Write("OFF, host turned off")
End Try
here i connect the 20 machines through LAN.here i give all the machine IP in code behind(same as above code)
if i run the application ,the application performance is poor display the LAN details 5 min
how can i improve my applicaton peformance
Regards
saravnan
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
Plz help....
While i'm clicking the linkbutton i'll get N=A or N=D in Url box...
Thanks in advance
|
|
|
|
|
I want to display a message box with Ok and Cancel buttons in Asp.Net using C#. Can anyone help me in this?
Thanks in advance..
Thanks & Regards,
Radha
|
|
|
|
|
You ought to use Javascript to achieve this.
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
|
|
|
|
|
Use JS, confirm method for this.
|
|
|
|
|
Use , JavaScript
Alert, Confirm
|
|
|
|
|
I have tried the following but its nmot geting displayed..
Here is my code..
protected void btnSubmit_Click(object sender, EventArgs e)
{
...
CheckDate();
...
}
protected void CheckDate()
{
...
if (id > 0){ ClientScript.RegisterClientScriptBlock( typeof(Page), "Script", "alert('Selected Date have already Data.. Are you sure you want to continue for the same date? ');", true); }
else
{ ... }
}
Did i misss anything here? Can u plaese help me?
Thanks in Advance..
Thanks & Regards,
Radha
|
|
|
|
|
Radha27 wrote: if (id > 0){ ClientScript.RegisterClientScriptBlock( typeof(Page), "Script", "alert('Selected Date have already Data.. Are you sure you want to continue for the same date? ');", true); }
This won't help you. Your alert will be displayed after page processes all data. Do this in other page and show you message on the page.
|
|
|
|
|
Sorry navaneeth, can u explain me how can i do this?.. if u dont mind
Thanks in Advance
Thanks & Regards,
Radha
|
|
|
|
|
Radha27 wrote: if (id > 0){ ClientScript.RegisterClientScriptBlock( typeof(Page), "Script", "alert('Selected Date have already Data.. Are you sure you want to continue for the same date? ');", true); }
The above code won't work because, JS will emitted to the response and displayed to the page after all processing done by ASP.NET. It won't wait until you press the Ok button in the alert. So this method is no use. Instead of this, you can redirect to another page where a message will be displayed like "Selected date have already data. Are you sure to continue". Put two buttons, "Continue" and "Cancel". Inside "Continue" button write your logic for continuing the operation.
Hope it clear now.
|
|
|
|
|
Ok, Thank u, I got it.. but is there any other possibility to solve this?
Thanks & Regards,
Radha
|
|
|
|
|
You can display this in same page also. Put those two buttons inside a panel which is set as hidden when page loads. When your condition satisfies, make this panel visible which will show message and buttons. This help you to avoid transferring data from this page to the message page.
|
|
|
|
|
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
|
|
|
|