|
i m using company's personal server,so publishing steps are
1. open inetmgr(internet information service) through run command
2. select & brows local computer.
3. select & Brows websites
4. select & right click default websites.
5. select new option then virtual directory which run wizard give alias name,then directry name where its present,check all the option.
|
|
|
|
|
hi,
Now pls check yr connection string in web.confgi. R u able to login into the database frm application.
2. Are u trying to create query at runtime?
3. If u find everything ok then try to use SP inplace of hard coded query.
Regards
Anil Pal
|
|
|
|
|
Hi all,
I have a problem with login and logout of website. as usual i can login into an website, but when i click signout and come to login page and click back button in IE or other browsers, i see a strange thing, it goes last visited screen of the application before signing out.Generaaly this should not happen.Can anyone help regarding this problem. It should not allow to go back once signout is clicked.Hope i will get early reply for this Query.
Thanks Before answering,
Sundeep G
|
|
|
|
|
u can apply javascript to disable back button.
|
|
|
|
|
I am telling IE back button.If it is possible let me know how.
Regards,
Sundeep G
|
|
|
|
|
Hi,
I am telling IE back button?? What does it mean.
Pls can u explain it.
Regards
Anil Pal
|
|
|
|
|
Hi Anil Pal(Especially for You),
Get into Code project site and login with your email id and password.Now Click on "Sign out" and You will be seeing site with No login account.Now click on back(History) button,Then you will see some screen with only login Id, but not password.This is called authentication.This is what, i was searching for.Feel free to ask some more.Ok Bye.
Best regards,
Sundeep G
|
|
|
|
|
Mr Sundeep,
Have a look on the code I Posted earlier.. Even if you click Back button of the Internet Exploer, On Page Load event it will check the Session("UserID"), Obviously it will be empty, because you made it clear on signout...So immediately it will redirect to login page.
Never you can see the backpage after you logged out.
Ramesh Sambari
|
|
|
|
|
See Sandeep,
On Every Page, Except Login Page, In Page Load Event Just write this Code.
If Trim(Session("UserID")) = "" Then
Response.Redirect("ErrorPage.aspx")
End If
Don't forget to clear the Session("UserID") value to "" on Logout or Session End
Ramesh Sambari
|
|
|
|
|
By using javascript ,you can disable back/history button
modified on Thursday, April 2, 2009 5:51 AM
|
|
|
|
|
are you surely check the properties windows for the logout button redirection to loginpage check it and if it is already done by you then try this:
1.make sure of session closing by session.abandon();
2.make sure to check if session is not null on page load if so
make sure to redirect the user to login page in case of session.tostring()==null;[not real code e.g. only].
and pls read some books before coming here.
Have Fun,
Alok
|
|
|
|
|
Hi all,
below is my aspx page ,when it is loading it showing the error
"Unterminated string constant". Pls suggest any solutions
<%@ Page language="c#" Codebehind="Schedule.aspx.cs" AutoEventWireup="True" Inherits="ATTAWebAdmin.Schedule" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Schedule Test</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">BODY { MARGIN: 1px }
.style1 { FONT-WEIGHT: bold; COLOR: #000000 }
</style>
<LINK href="acusis_css.css" type="text/css" rel="stylesheet">
<LINK href="Images/webremote.css" type="text/css" rel="stylesheet">
<link href="ATTAWebAdmin.css" rel="stylesheet" type="text/css">
<style type="text/css">.style2 { COLOR: #000000 }
</style>
<script language="javascript">
<!--
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<table height="100%" cellSpacing="1" cellPadding="1" width="100%" align="center" bgColor="#ffffff"
border="0">
<tr>
<td vAlign="top" align="center" bgColor="#ffffff">
<table height="100%" cellSpacing="1" cellPadding="0" width="100%" align="center" bgColor="#cccccc"
border="0">
<tr>
<td vAlign="top" align="center" bgColor="#ffffff" height="100%">
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" bgColor="#ffffff" border="0">
<tr>
<td class="cell_gap1" vAlign="top" align="left" bgColor="#ffffff" height="2">
<TABLE id="Table2" cellSpacing="1" cellPadding="1" width="100%" bgColor="#ffffff" border="0"
runat="server">
<TR>
<TD class="style2" align="left" width="25%" bgColor="#ffffff"><IMG src="Images/Header.jpg">
<DIV style="LEFT: 5px; WIDTH: 200px; POSITION: absolute; TOP: 7px; HEIGHT: 15px"><strong><FONT color="#000000" size="2">
Re-Schedule Test</FONT></strong>
</DIV>
</TD>
</TR>
</TABLE>
</td>
</tr>
<tr>
<td align="left" bgColor="#ffffff"></td>
</tr>
<tr>
<td class="cell_gap" align="right" bgColor="#ffffff" height="100%">
<div align="right">
<table cellSpacing="1" cellPadding="0" width="100%" border="0">
<tr>
</tr>
</table>
<TABLE height="100%" cellSpacing="1" cellPadding="1" width="100%" align="center" bgColor="#ffffff"
border="0">
<TR>
<TD height="5"><span id="Message" runat="server" EnableViewState="false"></span></TD>
</TR>
<TR>
<TD vAlign="top" align="center">
<TABLE cellSpacing="1" cellPadding="1" width="300" bgColor="white" border="0">
<TR>
<TD style="HEIGHT: 5px" noWrap align="right"><FONT color="#993333"><STRONG>Re-Schedule for
Candidate :</STRONG></FONT></TD>
<TD style="HEIGHT: 5px"><FONT color="#993333"><STRONG> </STRONG> </FONT>
<asp:label id="lblCandidate" runat="server" Width="336px"></asp:label></TD>
</TR>
<TR>
<TD noWrap align="right"><STRONG>Email * :</STRONG>
</TD>
<TD><asp:textbox id="txtEmail" Runat="server"></asp:textbox>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="Email Cannot be Empty"
ControlToValidate="txtEmail"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ErrorMessage="Enter a valid Email"
ControlToValidate="txtEmail" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></TD>
</TR>
<TR>
<TD vAlign="top" align="right"><STRONG>Schedule*:</STRONG></TD>
<TD noWrap><asp:label id="lblStatus" runat="server" Width="480px" Font-Bold="True"></asp:label><BR>
<asp:calendar id="TestSchedule" runat="server" Width="168px" ShowGridLines="True" BorderColor="#FFCC66"
Font-Names="Verdana" Font-Size="8pt" Height="150px" ForeColor="#663399" DayNameFormat="FirstLetter"
BackColor="#FFFFCC" BorderWidth="1px">
<TodayDayStyle ForeColor="White" BackColor="#FFCC66"></TodayDayStyle>
<SelectorStyle BackColor="#FFCC66"></SelectorStyle>
<NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC"></NextPrevStyle>
<DayHeaderStyle Height="1px" BackColor="#FFCC66"></DayHeaderStyle>
<SelectedDayStyle Font-Bold="True" BackColor="#CCCCFF"></SelectedDayStyle>
<TitleStyle Font-Size="9pt" Font-Bold="True" ForeColor="#FFFFCC" BackColor="#990000"></TitleStyle>
<OtherMonthDayStyle ForeColor="#CC9966"></OtherMonthDayStyle>
</asp:calendar>
</TD>
</TR>
<tr>
<td align="right" style="height: 28px">
<asp:Label ID="lblreason" runat="server" Text="Reason for Re-Scheduling:" ForeColor="#804000" Font-Bold="True"></asp:Label>
</td>
<td style="height: 28px">
<asp:TextBox ID="txtreason" runat="server" Height="41px" MaxLength="250" TextMode="MultiLine" Width="242px"></asp:TextBox>
</td>
</tr>
<TR>
<TD noWrap align="right"><STRONG>Evaluation:</STRONG></TD>
<TD noWrap><asp:checkbox id="chkEvalMode" runat="server" Checked="true" Text="Manual"></asp:checkbox></TD>
</TR>
<TR>
<TD align="center" colSpan="2"><asp:button id="btnSubmit" runat="server" Text="Re-Schedule" ForeColor="#000000" CssClass="normalTextForBtn"></asp:button></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%----%>/////////////////////////////
<script language="javascript">
function validateScheduleDate()
{
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth();
var curr_year = d.getFullYear();
var currDate = ((curr_month+1) + "/" + curr_date + "/" + curr_year);
var tdate=document.getElementById('<%=hdnDate.clientID %>');
var startdate = new Date(currDate);
var enddate =new Date(tdate);
var m3 = startdate.getTime();
var m4 = enddate.getTime();
var diff1 = m4-m3;
if( ((diff1/1000/60/60/24)+1) >30)
{
alert("Test cannot be scheduled beyond 30 days.");
return false;
}
}
</script>
</form>
</body>
</HTML>
|
|
|
|
|
Problem in this code:-
<title>Schedule Test</title>
<!-- #Include file="CheckSession.htm" -->
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">BODY { MARGIN: 1px }
.style1 { FONT-WEIGHT: bold; COLOR: #000000 }
</style>
<LINK href="acusis_css.css" type="text/css" rel="stylesheet">
<LINK href="Images/webremote.css" type="text/css" rel="stylesheet">
<link href="ATTAWebAdmin.css" rel="stylesheet" type="text/css">
<style type="text/css">.style2 { COLOR: #000000 }
</style>
<!-- Client Side JavaScript -->
<script language="javascript">
<!--
//-->
</script>
<big><b>JUST delete it</b></big>
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Hi,
I am attempting to unit test some code i have written. Unfortunately I am having an issue when using a generic list of an object type I have defined. I'm basically checking to see that this list is equal to 0 and if it is return false. However when the check is performed I get a null exception error. Below is an example (not exact code) of the code I'm trying to test and the bold and underline is where i'm receiving the error. Thanks in advance to all that reply.
private Car _car = new Car();
//constructor
public CarValidation(Car carDetails)
{
if (carDetails == null)
throw new ArgumentNullException();
else
_car = carDetails;
}
public bool CheckForValues()
{
bool valid = true;
if(_car.OilPressure == null)
valid = false;
if (_car.TirePressure == null)
valid = false;
if (_car.GasAmount == null)
valid = false;
if (_car.Mp3SongsLoaded.Count == 0)
valid = false;
return valid;
}
|
|
|
|
|
What is the type of Mp3SongsLoaded ? You haven't shown the piece of code where you are instantiating type of Mp3SongsLoaded . So I assume, that might be NULL and you are accessing Count on a NULL reference.
BTW, how come you thought ASP.NET forum will be appropriate for this question?
|
|
|
|
|
Hi All,
I am using itexthsharp to export my gridview to PDF and one of my column is an image and I am stuck on to add it to the code. Here is the code I am testing:
Protected Sub btnExport_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim columnCount As Integer = GridView1.Columns.Count
Dim rowCount As Integer = GridView1.Rows.Count
Dim tableRows As Integer = rowCount + 3
Dim grdTable As New iTextSharp.text.Table(columnCount, tableRows)
grdTable.BorderWidth = 1
grdTable.BorderColor = New Color(0, 0, 255)
grdTable.Cellpadding = 5
grdTable.Cellspacing = 5
Dim c1 As New Cell("Exporting paging enabled GridView to PDF example")
c1.Header = True
c1.Colspan = 2
grdTable.AddCell(c1)
Dim c2 As New Cell("By amiT jaiN , amit_jain_online@yahoo.com")
c2.Header = True
c2.Colspan = 4
grdTable.AddCell(c2)
grdTable.AddCell("Name")
grdTable.AddCell("Description")
grdTable.AddCell("Price")
grdTable.AddCell("Thumbnail")
For rowCounter As Integer = 0 To rowCount - 1
For columnCounter As Integer = 0 To columnCount - 1
Dim strValue As String = GridView1.Rows(rowCounter).Cells(columnCounter).Text
grdTable.AddCell(strValue)
Next
Next
Dim Doc As New Document()
PdfWriter.GetInstance(Doc, Response.OutputStream)
Doc.Open()
Doc.Add(grdTable)
Doc.Close()
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "attachment; filename=AmitJain.pdf")
Response.[End]()
End Sub
As you can see I need to include the "Thumbnail" column as an image.
Thank you
|
|
|
|
|
I have a web service that uses web methods which pass strong type parameters.
These parameters are objects generated from xsd's through xsd.exe. When the web service is added as a reference to another app, as I understand, wsdl is generated from this and passed through SOAP headers.
I have a web service in a separate project in my solution. I add a reference from another project and the reference works fine - I can pass the strong type parameters that have been defined.
However, I've deployed the web service to a different server and I'm not able to call the method - "Unable to connect to the remote server"
I think this might have something to do with a <webservices> setting that needs to be added to Web.config for this type of request.
Can someone provide some guidance on this?
|
|
|
|
|
Hi all,
I have code for menu in page.aspx, but now i want write this code in page.aspx.vb for menu programming.
How i can convert this code?
this is my code:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Panel ID="Panel1" Runat="Server">
<asp:LinkButton ID="LinkButton1" Text='<%# Eval("nam") %>' Runat="Server"
PostBackUrl='<%# Eval("id","Page.aspx?id={0}") %>'
ForeColor="#990000"
Font-Underline="False"/>
</asp:Panel>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
i didn't use SqlDataSouece, and i used dataset for filling gridview.
Now how i can write these code in page.aspx.vb instead of using Eval in page.aspx?
Thank you
Hoda
|
|
|
|
|
Handle RowDataBound[^] event, use FindControl() to find the link button and set the PostBackUrl .
Looks like you need a HyperLink button here, not LinkButton .
|
|
|
|
|
How do I suppress a specific warning for asp.net. I know when you are building a windows app you can go the the project properties and under the build tab you can suppress a specific warning number. What would be it's equivalent in ASP.Net for VS 2008.
|
|
|
|
|
i think in asp.net nothing exist like suppression of warning....
only windows application provide this functionality
Government Dyal Singh College Lahore.
|
|
|
|
|
I did find this msdn.microsoft.com/en-us/library/3y20cc1z(VS.80).aspx on msdn, but I haven't found the exact syntax. So, I know you can do it.
|
|
|
|
|
|
sometimes if your project is big enough then you are going to run into a warning that just isn't valid for that function. Especially if you are going in behind someone else's code. I appreciate the effort though.
I actually found the syntax after half a day of trying code and looking. According to one blog this is the syntax. compilerOptions="/nowarn:42105". But it doesn't seem to be suppressing the warnings..
If someone "who has actually" put this in the web.config file has any insight it would be greatly appreciated.
|
|
|
|
|
Hello,
First of all, I hope people won't eat me for asking this, but the fact is I'm kind of stuck on it.
I have a problem displaying my .aspx file in any other browser except Internet Explorer.
When I try to use lets say FireFox/Google Chrome or what ever other browser, it automatically starts
to download my .aspx file. Now the thing is, I can't understand what I'm doing wrong or what have I
missed out.
1) It all works when I test it with "Build+Run"
2) It displays in IE
I've read something about IIS but.. I don't get it, how should I use it.
Maybe someone kind enough would enlighten me on this matter.
Thanks! (from someone who started learning C#/ASP.NET)
|
|
|
|