|
First let me try whats ASP and then, will jump into ASP.NET and join you soon... ok. Anyway, Thanks
|
|
|
|
|
SPS wrote:
First let me try whats ASP and then, will jump into ASP.NET and join you soon... ok. Anyway, Thanks
I assumed you were new to ASP, that's why I suggested ASP.NET, there's no point in statrting in ASP then moving to ASP.NET, they are worlds apart. Eg. I cant do any ASP myself, but ASP.NET is a breeze. I would seriously recommend you start ASP.NET and stick to it
CHeers
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
If thats the case..... Thanks for the advice. I will take this a good advice, and move into asp.net. Again... thanks..
|
|
|
|
|
Is it possible to implement a list view control in HTML/javascript? I'm thinking something along the lines of SysListView32 in report mode.
--
Please state the nature of your medical emergency.
|
|
|
|
|
Jörgen Sigvardsson wrote:
Is it possible to implement a list view control in HTML/javascript? I'm thinking something along the lines of SysListView32 in report mode
Anything is possible.
http://webfx.eae.net/webboard/ [^] might have some implementations of what you want.
|
|
|
|
|
Impressive stuff! Unfortunately it doesn't work with Mozilla/Netscape which is one of my requirements. But maybe I'll be able to use some of it - I don't need all that fancy pancy stuff
--
Please state the nature of your medical emergency.
|
|
|
|
|
I think I've come up with a solution. div and table are my friends I believe.
I've never really understood the purpose of div before. But these last few days have really made me aware of its powers.
Maybe, just maybe, I'll be able to make something constructive of blink too..
--
Please state the nature of your medical emergency.
|
|
|
|
|
Jörgen Sigvardsson wrote:
I've never really understood the purpose of div before
A DIV is simply a container to which you can apply CSS reliably, nothing more. Very useful though
Jörgen Sigvardsson wrote:
I'll be able to make something constructive of blink too
Get drunk again and then re-think that blink tag. Imagine the pain inducing blinkness of it during a hangover
|
|
|
|
|
Paul Watson wrote:
Get drunk again and then re-think that blink tag. Imagine the pain inducing blinkness of it during a hangover
ROTFLMAO!!!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
You could use an iframe, and have it display a dynamically generated page
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
I thought about it, but it would be too complex for my backend to handle, I think. I haven't put much thought into it, but I know I'd have to do page to page "marshalling" which doesn't really fit my model.
I've implemented a "GUI" toolkit in Java/JSP. Each page is a form, and each controlling GUI component uses the GET/POST-mechanism and various javascripts to signal events to the server components. And I maintain various states in the frame (my name for a web page), keep internationalizable information, data bound components etc. This model only works well inside page boundaries. I have been pondering though if I could cross the page boundaries and use frames/iframes, but as the project I'm working on doesn't require that, I'll keep it for a rainy sunday or something.
I finally managed to solve the problem using div and table. I got a nice looking list view/report in the end.
--
Please state the nature of your medical emergency.
|
|
|
|
|
Is there any way to have access to properites of user control,in my code behiind?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Mazdak wrote:
Is there any way to have access to properites of user control,in my code behiind?
Yup, just define your usercontrol in your code behind as you would any normal control.
Remember your usercontrol is effectively the same as any of the "official" controls, no special treatment required.
e.g.
ASPX page:
...
<body>
<RKA:Header id="header" runat="server" CurrentSection="Garden Design" />
...
and then codebehind:
...
public class _template : System.Web.UI.Page
{
public rka_revamp._header header;
private void Page_Load(object sender, System.EventArgs e)
{
header.CurrentSection = true;
}...
|
|
|
|
|
Ages ago I read that when ASP.Net arrived we'd be able to "package" up the whole application so that it could be shipped off to a hosting provider without worrying about them stealing IP.
Did this eventuate? Or is it still on the wish list?
Gracias,
|
|
|
|
|
You can (of sorts). You can produce compiled code that can then be dropped into the /bin directory and off you go. For example, I've produced a few validation controls (they're on CodeProject), you can add the tags into the aspx pages directly, drop in the assembly and you're off. You could produce commercial controls in such a way and thus provide some IP protection.
Since its just IL it is pretty easy to reverse engineer, and there are tools that can produce C# code from a compiled assembly. Consequently, pre-compiling doesn't afford a huge amount of protection. If that's the case you'll need to look at obfuscation.
--
Paul
"I need the secure packaging of Jockeys. My boys need a house!"
- Kramer, in "The Chinese Woman" episode of Seinfeld
MS Messenger: paul@oobaloo.co.uk
Sonork: 100.22446
|
|
|
|
|
I have this code:
public void OnLogin(object sender, System.EventArgs e)
{
if(IsLoginCorrect(User.Text, Pass.Text))
{
FormsAuthentication.RedirectFromLoginPage(User.Text, false);
}
else
{
Error.Text = "Fel, försök igen!";
}
}
public bool IsLoginCorrect(string user, string password)
{
string connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("mp219.mdb");
OleDbConnection connection = new OleDbConnection(connectString);
try
{
connection.Open();
StringBuilder builder = new StringBuilder();
builder.Append("SELECT COUNT(*) FROM Loin WHERE User = \'");
builder.Append(user);
builder.Append("\' AND CAST (rtrim (Password) as VARBINARY) = CAST(\'");
builder.Append(password);
builder.Append("\' as VARBINARY");
OleDbCommand cmd = new OleDbCommand(builder.ToString(), connection);
int count = (int)cmd.ExecuteScalar();
return (count > 0);
}
catch(Exception e)
{
Response.Write(e.ToString());
return false;
}
finally
{
connection.Close();
}
}
Whyyyyyyyyyyyyyyyyyyy does it throws an eception????????
Is it because the command string isn't correct?
I don't think so... I could be wrong... can you help me!!!???
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
What exception are you getting?
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
I'm not so sure, but you mite need to set the command before opening the connection, as such:
OleDbCommand myCommand = new OleDbCommand(myScalarQuery, myConnection);
myCommand.Connection.Open();
myCommand.ExecuteScalar();
myConnection.Close();
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
Rickard Andersson wrote:
FROM Loin WHERE User = \'"); builder.Append(user); builder.Append("\' AND CAST (rtrim (Password) as VARBINARY) = CAST(\'"); builder.Append(password); builder.Append("\' as VARBINARY");
Why have you put the character-escape \ into this? A single quote does not need to be escaped, does it?
Anyway I just put your code into C# and no compiler errors came up without the \ bits. Maybe thoses \s are going through to SQL itself and causing a problem.
|
|
|
|
|
Oh... does are not meaning to be there!
I tried if that was that caused the exception, but it wasn't....
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard Andersson wrote:
Is it because the command string isn't correct?
I don't think so... I could be wrong... can you help me!!!???
Oh wait I just figured it out. You are missing a closing bracket on the end of your command string. Change builder.Append("\' as VARBINARY"); to builder.Append("\' as VARBINARY)");
Helpful tip #1 for SQL: Always Response.Write your command strings out to check them. Then copy and paste that string into Query Analyzer and run it to pick up any errors. Best debugging method I have ever learnt for SQL
|
|
|
|
|
Paul Watson wrote:
Oh wait I just figured it out. You are missing a closing bracket on the end of your command string. Change builder.Append("\' as VARBINARY"); to builder.Append("\' as VARBINARY)");
Oh!
So I did a miss in the command string anyway!!!
Paul Watson wrote:
Helpful tip #1 for SQL: Always Response.Write your command strings out to check them. Then copy and paste that string into Query Analyzer and run it to pick up any errors. Best debugging method I have ever learnt for SQL
Query Analyzer?
Is it an built in tool or what in Access 2000?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard Andersson wrote:
Is it an built in tool or what in Access 2000?
SQL Server tool. Just do a query ("fråga" in Swedish) in Access
--
Please state the nature of your medical emergency.
|
|
|
|
|
Jörgen Sigvardsson wrote:
("fråga" in Swedish)
Nice!
Then I know how to debug a SQL query in Access 2000!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
I am loosing my mind here and want to make sure that I am not simply trying to do somehting that can't be done, allthough I can't belive that it can't be done really.
Problem:
I want to keep a simple counter on my website that tracks how many people are logged in. The value of this counter should be placed onto a label control when a page is loaded.
Proposed Solution:
I have this code in my global.asax file...
Public Class Global
Inherits System.Web.HttpApplication
Protected Shared m_ActiveUsers As Integer
#Region " Component Designer Generated Code "
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
End Sub
#End Region
Public Shared ReadOnly Property ActiveUsers() As Integer
Get
Return m_ActiveUsers
End Get
End Property
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Application.Lock()
m_ActiveUsers = 0
Application.UnLock()
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Application.Lock()
m_ActiveUsers = m_ActiveUsers + 1
Application.UnLock()
End Sub
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
' Fires at the beginning of each request
End Sub
Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
' Fires upon attempting to authenticate the use
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Fires when an error occurs
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Application.Lock()
m_ActiveUsers = m_ActiveUsers - 1
Application.UnLock()
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application ends
End Sub
End Class
I have this code in my WebForm.aspx.vb file
Private Sub Page_Load(ByVal sender As System.Object,_
ByVal e As System.EventArgs) Handles MyBase.Load
lblVisitors.Text = Global.ActiveUsers.ToString + " Visitors"
End Sub
The problem is that the label contents are ALWAYS blank!
Any ideas out there as to what I am doing wrong?
Help me please before I decide to do something drastic!
|
|
|
|