I set mine up by either placing them inside a HTML table or by using the style tag. HTH
Gavin_Mannion
Posts
-
Server Side Includes -
Server Side IncludesPerfect, now I can redesign my entire site.... hmm maybe not the best idea.. :) Good to know for the future though Thanks, Gavin ;)
-
Server Side IncludesHow would Session Variables work? Example: I have a .aspx page with 1 text box on it called textbox1 After this control I have a control called button.ascx When I load this page I click on the button which is in the control and I want it to redirect me to the URL that I have typed in textbox1 but I can't seem to access textbox1 from button.ascx How would I do this? Thanks, Gavin
-
Server Side IncludesHi All, Does ASP.NET still support SSI's? If so how do I do it? My other question is in regard to Controls. I have a control called 'navigation.ascx' which holds all my navigation buttons for my application. I place this control below every page. What I am trying to do is when the client clicks on Button1 I populate the database with all the data from Page1. But I can't seem to figure out how to pass data to a control dynamically. Is this possible? Thanks, Gavin
-
Printing from a webpageThanks a million, Works like a treat
-
Printing from a webpageHi All, I am using ASP.NET and C# I would presume this is an easy question but I can't seem to find any information about it. I would like to add a button to my webpage that when clicked acts just like the print option of Internet Explorer. ie. Brings up a box to ask you what printer you want to print. I'm sure there must be a straight function that I can call, something like Document.Print? Thanks, Gavin
-
Crystal Reports Not WorkingHi All, I am still stuck trying to get some Crystal Reports working. From what I have found out all my code is correct and I must just be missing something else. Now the thing is I have no idea what that something else is. I have downloaded the samples from Crystal Decisions and used them and I get the same error message.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
CrystalDecisions.Web..get_7() +189
CrystalDecisions.Web.CrystalReportViewer.OnInit(EventArgs e) +352
System.Web.UI.Control.InitRecursive(Control namingContainer) +235
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Page.ProcessRequestMain() +169
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
Could someone please tell me what I am doing wrong here? Thanks, Gavin
-
Running Page_Load EventThat solves it.. Thanks, Is there a decent reason on why it is running the Load_Page after I push submit and before the actual submit?
-
Running Page_Load EventHi All, I am having an annoying problem that hopefully you can explain to me. I have some code in my Page_Load event that load previous data into all the textboxes on a form. I then enter my new data and submit, but for some reason it is clearing all the data in my form before submitting, the only reason that I can come up with is that it is loading the Page_Load event which is populating the form with blanks from my database? Does this make any sense and can I fix this? Thanks, Gavin
-
Datagrids and Regular ExpressionsHi All, I am using a datagrid on a page to show some data from my sql database. I just need to know if you can use a regular expression to change a 1 into 'Male'? If not how would I change something like that. My SQL database is returning integers and I want to display them nicely. Thanks, Gavin
-
COM running twiceHi All, I have a simple ASP page that connects to a COM Component to add some data to my Database, it works 100% apart from the fact that it runs it twice? Is this a known problem or could someone explain how I can stop this. Here is the code from my ASP Page
AppMonitor = Server.CreateObject("AppMonitor.LoginDetails").InitialLogin
(Application("cdscConnection"), gstrAccountName, Session.SessionID, stest)and the actual component
Public Function InitialLogin( _
ByVal ConnectionString As String, _
ByVal AccountName As String, _
ByVal SessionID As String, _
ByRef stest As Variant _
) As Long
Dim UserID As String
UserID = "sa"
Dim Password As String
Password = ""
Dim sql As String
sql = "EXEC cdsc_TBTrace 0, '" & Replace(AccountName, "'", "''") & "', " & SessionID
On Error GoTo ErrorHandler
Set cn = New ADODB.Connection
cn.Open (ConnectionString)
cn.Execute (sql)
stest = "Success"
cn.Close
ErrorHandler:
With Err
stest = Err.Description & "
" & Err.Number
End With
End FunctionThanks, Gavin
-
Crystal ReportsOkay well that has solved the invalid escape sequence thingie, BUT :) now I am getting the following error
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
CrystalDecisions.Web..get_7() +189
CrystalDecisions.Web.CrystalReportViewer.OnInit(EventArgs e) +352
System.Web.UI.Control.InitRecursive(Control namingContainer) +235
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Page.ProcessRequestMain() +169Would this be a problem with the actual report (which seems to work fine of opened in Crystal) or is it still a coding error? Thanks
-
Crystal ReportsIt was set as a server side string because that is how the Crystal Report Viewer set it itself. What I did was I dragged the CrystalReportViewer off the toolbox and dropped it onto my form. I then selected it and in the properties window click on the ... next to databindings. I then went into the ReportSource and put in the exact Source and clicked ok and it did the rest :)... I changed it as you suggested and am now getting the following error.
Cannot create an object of type 'System.Object' from its string representation 'C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt' for the 'ReportSource' property
I'm sure this is meant to be a lot simpler than it has turned out to be? Thanks for the help
-
Crystal ReportsHi All, I am trying to view some Reports online through my Internet site. I am using C# on a Windows 2000 server running IIS5. I have looked around the internet and found some examples but they are not working. I have the following at the moment.
In design view I cn now see my report, but when I compile and view my page I get
CS1009: Unrecognized escape sequence
???? Can someone let me know where I am going wrong and how to sort this out. Thanks, Gavin
-
!!!Cookies!!!Okay in original ASp I was told to never store so much data in a Session Object and to either use Cookies or a Database. Now I'm being told not to use Cookies for this much data? You just can't win, at least it makes sense now though, I will use my SQL database instead. Cheers, Gavin PS: Thanks for the help :-D :-D :-D
-
System.Net.dll does not exist!Have you made sure you installed the .NET framework. I had this problem once and I had to uninstall the Framework and reinstall and everything worked fine.
-
Checking to see if a cookie exists:cool: werkin :cool: I see the logic, you have to check to see if the Cookie exists before checking to see if the cookies key exists or has any data... Seems to be 100% Thanks :)
-
Checking to see if a cookie existsTried that, for some reason the page falls over if I try the following if (HttpContext.Current.Request.Cookies["NewOutbreak"]["Test"] == "") { //Do Something amazing } else { Go home } I get an error saying something like cannot check for null as it doesn't exist.??
-
!!!Cookies!!!Hi All, I thought I had finally figured out cookies and have now run into another problem. I have 2 pages which both add data to a cookie as follows **********Page 1********** HttpContext.Current.Response.Cookies["MyCookie"]["Session"]= Session.SessionID; HttpContext.Current.Response.Cookies["MyCookie"]["MyName"] = "Gavin"; HttpContext.Current.Response.Cookies["MyCookie"]["MyDrink"] = "Beer"; **********Page 2********** HttpContext.Current.Response.Cookies["MyCookie"]["MyFood"]= "Pizza"; HttpContext.Current.Response.Cookies["MyCookie"]["MyTeam"] = "Liverpool"; ************************** After Page 1 as I enter Page 2 my 3 Cookie Keys (Session, MyName & MyDrink) are all fine, but as I try and add the 2 new Keys my cookie loses the first 3? I hope everyone understood that one :) Can someone explain why this is and how do I stop it. I am looking at saving about 100 different things in this cookie so I don't really want to rewrite all the keys on every page. Thanks, Gavin
-
Checking to see if a cookie existsHi All, Quick question here, I need to check to see if a cookie exists when someone enters 1 of my pages. This is an intranet so I know that everyone accepts cookies but is there way to see if a certain cookie exists? :~ :~ :~ Thanks, Gavin