|
Hi,
I m not getting but, exactly what u want to do?? Can u specify yr problem ?
regards,
Rana Krishnraj
|
|
|
|
|
Thing is that i am developing an asp.net application. in which i have desiging with certain imagebutton control.
like Objective.Aboout us.
I want when i clicked on objective image button it shold display the obj.htm webpage in the browser.
i have tried this with postbackurl property but it shows the error. "The HTTP verb POST used to access path '/rwssMIS/obj.htm' is not allowed."
so how to display that htmlpage???
|
|
|
|
|
Can you post your code please to help us see what is happening
|
|
|
|
|
hai
this is my code about whome ur atalking about..
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head id="Head1" runat="server"><br />
<title>Untitled Page</title><br />
<script type="text/javascript" language="JavaScript" src="news/news_eng.js"></script><br />
<link rel="stylesheet" href="scripts/rwsstyle.css" type="text/css" /><br />
<script type="text/javascript" language="javascript"><br />
var swidth=323;<br />
var sheight=115;<br />
var sspeed=1;<br />
var wholemessage="<ul>";<br />
<br />
for(i=0; i<theSummaries.length; i++)<br />
{<br />
if(i==theSummaries.length-1)<br />
{<br />
wholemessage=wholemessage+"<li><a class='ver10pxblack' href='outerwin.htm?id="+theSiteLinks[i] +"' target='_blank'>"+theSummaries[i]+"</a></li>";<br />
}<br />
else<br />
{<br />
wholemessage=wholemessage+"<li><a class='ver10pxblack' href='outerwin.htm?id="+theSiteLinks[i] +"' target='_blank'>"+theSummaries[i]+"</a><br><br></li>";<br />
}<br />
}<br />
<br />
wholemessage = wholemessage+"</ul>";<br />
<br />
</script><br />
<br />
<style type="text/css"><br />
<br />
.ver10pxblack {<br />
FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana<br />
}<br />
<br />
A:link {<br />
TEXT-DECORATION: none<br />
}<br />
A:visited {<br />
TEXT-DECORATION: none<br />
}<br />
A:hover {<br />
TEXT-DECORATION: underline<br />
}<br />
A:active {<br />
TEXT-DECORATION: none<br />
}<br />
</style><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<table style="width:720px;height:494px;" cellpadding="0" cellspacing="0" border="0" ><br />
<tr><br />
<td style="height:494px;width:480px;" align="left" bgcolor="#d9dadc" valign="top"><br />
<p class="left"><img src="images/e03.gif" alt="" width="14" height="16" border="0" align="absmiddle" /> <br />
<strong>NEWS & EVENTS</strong></p><br />
<br />
<script type="text/javascript" language="JavaScript"><br />
if (document.all)<br />
{<br />
document.writeln('<marquee id="ieslider" scrollAmount=1 width=100% height=60% direction=up style="border:0;">');<br />
document.writeln(wholemessage);<br />
ieslider.onmouseover = new Function("ieslider.scrollAmount=0");<br />
ieslider.onmouseout = new Function("if (document.readyState == 'complete') ieslider.scrollAmount=1");<br />
document.write('</marquee>');<br />
}<br />
</script><br />
</td><br />
<td style="height:494px;width:240px;" bgcolor="#106AB1"><br />
<table width="240px" cellpadding="0" cellspacing="0" border="0"><br />
<tr><br />
<td align="center" colspan="2" style="height:98px;width:240px;" ><br />
<p class="style5" ><br />
<span style="color:lightgoldenrodyellow; font-family:Arial;">Shri S.N. Tripathy, IAS,<BR/><br />
Commissioner-cum-Secretary to Govt <br/> <br />
................................................... <br/><br />
Er. P.K Panigrahi<br /><br />
Chief Engineer, RWS&S</span></p><br />
</td><br />
</tr><br />
<tr style="height:22px;width:240px;"><br />
<td colspan="2" align="center" style="width: 100%; "><img src="images/log.gif" width="100%" alt="" border="0" /></td><br />
</tr><br />
<tr><br />
<td width="1px" colspan="2"> </td><br />
</tr><br />
<tr><br />
<td style="width:30%;height:22px;" align="left"><p style="color: #FFFFFF; "><b>  USER ID </b></p></td><br />
<td style="width: 70%;height:22px;" align="center"><asp:TextBox ID="txtbxuid" runat="server" ></asp:TextBox></td><br />
</tr><br />
<tr><br />
<td style="height:22px;;width:30%;" align="left"><p style="color: #FFFFFF;"><b>  PASSWORD </b></p></td><br />
<td style="height:22px;; width: 70%;" align="center"><asp:TextBox ID="txtbxpwd" runat="server" TextMode="Password" ></asp:TextBox></td><br />
</tr><br />
<tr><br />
<td style="height:22px;;width:30%;text-align:left;"><p style="color: #FFFFFF;"><b>  USER TYPE </b></p></td> <br />
<td style="height:22px;;width:70%;" align="center"><asp:RadioButtonList ID="rdbtnuser" runat="server" RepeatDirection="Horizontal" ForeColor="white"><br />
<asp:ListItem Selected="True">USER</asp:ListItem><br />
<asp:ListItem>ADMIN</asp:ListItem></asp:RadioButtonList></td><br />
</tr><br />
<tr><br />
<td align="center" colspan="2" style="height:27px;"><asp:ImageButton ID="Imglogin" AlternateText="Login" runat="server" ImageUrl="~/images/login3.gif" OnClick="Imglogin_Click" /></td><%----%><br />
</tr><br />
<tr><br />
<td align="center"colspan="2" style="height: 3px;" ><asp:Label id="loginError" runat="server" ForeColor="Gold" Text= ></asp:Label><br />
</td><br />
</tr><br />
<tr><br />
<td colspan="2" style="height:246px;"><br />
<table border="0" cellpadding="0" style=" background-image: url(images/menubg.GIF); border-top: inactivecaptiontext thin solid;"><br />
<tr ><br />
<td align="center" style="width: 25%;" ><br />
<asp:ImageButton ID="ImgbtnObj" AlternateText="Objective" runat="server" ImageUrl="~/images/obj.gif" PostBackUrl="~/obj.htm" /><br />
</td></tr><br />
<tr><br />
<td align="center" style="width: 25%;" ><br />
<asp:ImageButton ID="imgbtnWpolicy" AlternateText="Policy" runat="server" ImageUrl="~/images/policy.gif" OnClick="imgbtnWpolicy_Click" /><br />
</td><br />
</tr><br />
<tr><br />
<td align="center" style="width: 25%;" ><br />
<asp:ImageButton ID="ImageButton3" AlternateText="PhotoGallary" runat="server" ImageUrl="~/images/photogal.gif"/></td></tr><br />
<tr><br />
<td align="center" style="width: 25%;" ><br />
<asp:ImageButton ID="ImageButton4" AlternateText="E-mail dir" runat="server" ImageUrl="~/images/emaildir.gif" PostBackUrl="~/EmailDir.aspx" /></td></tr><br />
<tr><br />
<td align="center" style="width: 25%; height: 28px;" ><br />
<asp:ImageButton ID="ImageButton5" AlternateText="Telephone Dir" runat="server" ImageUrl="~/images/telephone.gif" PostBackUrl="~/Telephonedir.aspx" /></td></tr><br />
<tr><br />
<td align="center" style="width: 25%;" ><br />
<asp:ImageButton ID="ImageButton6" AlternateText="District Info" runat="server" ImageUrl="~/images/dist.gif"/></td></tr><br />
<tr><br />
<td align="center" style="width: 25%;" ><br />
<asp:ImageButton ID="ImageButton7" AlternateText="Related links" runat="server" ImageUrl="~/images/links.gif" /></td></tr><br />
<tr><br />
<td align="center" style="width: 25%;" ><br />
<asp:ImageButton ID="ImageButton8" AlternateText="Organsation Setup" runat="server" ImageUrl="~/images/org.gif" /></td></tr><br />
</table><br />
</td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
</table><br />
</div><br />
</form><br />
</body><br />
</html><br />
|
|
|
|
|
Couldn't you just use onclick method for the button or am I missing the point?
|
|
|
|
|
Hi dear,
i see yr code. in some image button u use onClick event and in other image button u use PostBackurl. I don't understand why it is so. but its better to use code-behind file and use click event of image button. Hope u understand what i want to say.
regards,
Rana Krishnraj
|
|
|
|
|
I have an aspx website.I am trying to delete one user. While deleting I need to delete all files in one directory named "username" and after that the directory itself. The program deletes the files , but while deleting the directory it throws an exception saying "The directory is not empty". I am using the following code
if (System.IO.Directory.Exists(Server .MapPath ("Albums/username" ))
{
System.IO.Directory.Delete(Server .MapPath ("Albums/username"));
}
If you double click on the folder, you will see an empty one. But if the folder's properties is taken, it shows that it contains a file with size 8 KB.
Note: I am using this folder to store some images.
|
|
|
|
|
Directory.Delete takes a second argument which, when set to true, causes all subdirectories and files to be deleted from the specified directory.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Soumini Ramakrishnan wrote: If you double click on the folder, you will see an empty one. But if the folder's properties is taken, it shows that it contains a file with size 8 KB.
Are hidden file's and system file's displays on?
"Sometimes the greatest journey is the distance between two people" - Nice quote from a Nice Indian Movie
|
|
|
|
|
Dear Sir/Madam
i am the beginer in asp.net.i have problem in sending emails.
MailAddress SendFrom = new MailAddress("xxx@domainname.com");
MailAddress SendTo = new MailAddress("pediatric_info@yahoo.com");
MailMessage MyMessage = new MailMessage(SendFrom, SendTo);
MyMessage.Subject = "dfgdfgdfg";
string strBody = "<html><body><b>Thanks for registering in infection in children</b><br/><br/>" +
"<font color=\"red\">Your registration details are as follows:<br /><br /></font>Username='" + username + "' and <br />Password='" + hdn_password.Value + "'<br /><br/> Please keep this information for future reference.</body></html>";
MyMessage.Body = strBody;
SmtpClient emailClient = new SmtpClient("mail.domainname.com");
emailClient.Send(MyMessage);
this is the code is used neither i am getting any error nor receiving any mails.i am unable to understand where i am facing problem.
please........help! help! help!
|
|
|
|
|
Have U chacked in spam in your mail account??
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth
|
|
|
|
|
thanx for ur reply
yes i checked in spam no mails received
|
|
|
|
|
Hello,
My problem is regarding exporting the gridview data to excel.
First ,I exported the data from the grid to excel
My data is in the following format
Name Subject Names
Pankaj Mathematics
Pankaj Science
Pankaj Computers
Now i did the rowspan in the gridview and the gridview appears like this
Name Subject Name<br />
Pankaj Mathematics<br />
Science<br />
Computers
now the grid contains three rows
first row contains two cells
second row contains one and third also one.
So far it is ok
Now when i try to export the above formated gridview data to excel
it shows
Name Subject Names
Pankaj Mathematics
Pankaj Science
Pankaj Computers
Y it is happening like this?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
modified on Thursday, April 3, 2008 1:38 AM
|
|
|
|
|
What is in the code of your export function?
|
|
|
|
|
I have a table in the session and i sometimes modify it
Dim t as datatable = session("t")
'modify t
session("t") = t
Even if i dont save t after modifying it, it maintains changes
I know that tables are passed by reference
Is that ok not explicitly saving the table back to session after changing it? or could there be any problems?
Thanks for any suggestion
Alexei Rodriguez
|
|
|
|
|
Yes you are right the changes are going to reflect in Session object also
I think if you explicitly assign back to session after change wont make any performance issue, It will check both the references, as both are pointing to same object it is not going to create one more object.
Its all what i think, Comments are welcoomes
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Masters,
Maybe a simple question but one I need to ask because I don't know how to handle it. I have an Stored Procedure which returns rows from SQL Server and one of the columns is a bit field.
What I would like to do is to show a thumbnail image in a column if that bit field is set to true and hide the image if false.
Can anyone give me a heads up on how to acheive this. Everything else I have squared away, just this bit is giving me fits.
Thanks in advance for your suggestions.
|
|
|
|
|
You should convert the column into a template field
In the template field insert an image
And in the Bindings, bind the visible property to the BitField
After binding, You should have something like this
<asp:image runat="server" id="img" visible='<%# Eval("BitField") %>' />
If BitField evaluates to true, the image visible will be true, otherwise false
Remember, convert the column to a templatefield
Alexei Rodriguez
|
|
|
|
|
Seems extremly reasonable! I'll give it a shot. Thank you for the reply.
|
|
|
|
|
Believe it or not
It works
You can do many things with template fields
Alexei Rodriguez
|
|
|
|
|
Oh, I wasn't questioning your response at all. You just made it seem very easy and logical. Believe me, I had no idea how to go about it to make any inquiry about any response.
Besides, I won't be able to try it out until the morning..
|
|
|
|
|
Nevermind my last response. I read your's wrong. Sorry about that, I keep forgetting you can't read "tone".
|
|
|
|
|
Hi,
I have a method that retrieves a variable with a click
of a LinkButton. I need to use that variable in an other
method but it becomes null for some reason. I guess that
happens because of the page postback every time and since
i have an initialization command at the beginning of my code
it makes it null again. So should i pass an argument with
the page postback or disable the linkbutton's postback.
And How could i do any of those?
Your help is greatly appreciated.
phivos
|
|
|
|
|
Not sure if you need this variable to persist, but if you do, couldn't you assign it to a Session Variable and retrive it whenever you do a postback?
Just wanted to make a note that I am a newbie and am trying to contribute to this site as others have helped me.
|
|
|
|
|
ffowler wrote: Not sure if you need this variable to persist, but if you do, couldn't you assign it to a Session Variable and retrive it whenever you do a postback?
Have to agree with you FFowler there hold the variable value in session or viewstate but could you elaborate on the sequence of events you are trying to implement?
|
|
|
|