|
hello vipin,
I think the problem has arised due to the HTML design so plz check ur design. and also bcoz of the events that r fired when the page is created like initalze component(),page load,rendering... etc
ok try like that u will get byeee
Murali
|
|
|
|
|
Whenever I try to connect to the PUBS.MDF database, a login failed error message will appear.
I defined the connection string in the web.config file under the connectionstrings section like this:
[code]
add name="Pubs" connectionString="Data Source = localhost\SQLEXPRESS; Initial Catalog=Pubs;Integrated Security=SSPI"
[/code]
And setup the connection in the click event of a button:
[code]
Dim connectionString As String = WebConfigurationManager.ConnectionStrings("Pubs").ConnectionString
Dim myConnection As New SqlConnection(connectionString)
myConnection.Open()
..........
[/code]
And I put the PUBS.MDF file in the same folder as the vb source files.
How do I connect to the database correctly?
|
|
|
|
|
KaKa` wrote: add name="Pubs" connectionString="Data Source = localhost\SQLEXPRESS; Initial Catalog=Pubs;Integrated Security=SSPI"
This looks for a named instance of SQL Server called SQLEXPRESS, and then tries to find a DB called pubs in there. It sure as hell isn't going to find a file called 'pubs.mdf' ( which is an access database )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
what is the database extension supposed to be?
I downloaded it from the microsoft website and it states that these databases are for sql server 2000.
|
|
|
|
|
hello,can we download a .exe file without entering into a website,is it possible,i think we can do that by using RMI,but 'm not sure
can u pls help me out,as soon as possible...
Regards
shilpa
|
|
|
|
|
Not sure exactly what you mean - for a client to download a program, they need to request it from a web page, or connect to a site via an FTP program. You can't download a program without a program on the client end attempting the download, via HTTP or FTP, or via a web service call ( which is HTTP anyhow )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Is it., After getting regular expression, still he don't know how to integrate that with javascript,. it's shame on him. He can integrate this expression with javascript and that will give the result what he expected..
This is the article u have posted ystrday... See , this is the place to share ideas but not keep a Group Discussion or a quarllying place ok.. If we dont know we can post the article and share the doubts but wat is there to feel ashame ...So, plz dont use this kind of terminlogies...We need to help each other then only knowledge will be gained.
This applies to to even SSK also...
ok Murali....
Murali
|
|
|
|
|
1 - never post personal messages as new posts, the odds are that navneeth won't see this, because of other posts that will occur
2 - Goodness knows what you're talking about here. I am sure the terminology he used was correct, it's not his fault you didn't understand it ( assuming I've read you right ).
3 - If you google, you'll find out how to use regex in javascript, it's widely documented.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, the following code shows how to write Binary files to the browser using ASP.NET.
<br />
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)<br />
'Set the appropriate ContentType.<br />
Response.ContentType = "Application/pdf"<br />
'Get the physical path to the file.<br />
Dim FilePath As String = MapPath("acrobat.pdf")<br />
'Write the file directly to the HTTP content output stream.<br />
Response.WriteFile(FilePath)<br />
Response.[End]()<br />
End Sub<br />
Do I need the line Response.ContentType = "Application/pdf" in order to write the binary files to the browser? If so, how do I modify it so that it would aslo support other binary file types? Please show a sample code if you can. Thanks for your help.
|
|
|
|
|
ASPnoob wrote: o I need the line Response.ContentType = "Application/pdf" in order to write the binary files to the browser?
If it's a PDF, yes.
ASPnoob wrote: If so, how do I modify it so that it would aslo support other binary file types?
Google for the list of MIME types that IE supports, and change your text according to the file type you're trying to send.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Well, here I sit with a "classic" ASP site. My boss has now dropped the other shoe, as it were, and let me know I have "CAC" the site. A CAC is a card with a bit of circuitry in it that identifies the user. The only way I know of to do this is with ASP.Net.
Now, I absolutely cannot re-factor the site from classic ASP to .Net (as much as I'd like to), so I have to write a .Net access security wrapper that keeps non-authenticated users from getting to the actual site.
I don't see any reason why this wouldn't work. Indeed, we already have the .Net code already written, but for a 100% .Net site we did last year. However, I thought I'd pop in and ask if anyone can think of a reason that I can't do what I need to do.
Comments?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Why do you need .NET, is there a .NET control offered by the manufacturer of the card ?
The only issue with using .NET and classic ASP in the one site is if you need to share session state. There are various solutions to this problem on the web. I would imagine that any 'security wrapper' needs to pass session data, b/c you sure need a way to tell your asp site that any security check has passed.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Why do you need .NET, is there a .NET control offered by the manufacturer of the card ?
Well, I don't know how to answer that question. I don't think there's a special control available, but at the same time, it requires the 509 something-or-other .Net class. The authentication process somehow involves Active Directory. I don't think you can get there with ASP (I'm just assuming that because ASP came out a long time before these cards were invented).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: it requires the 509 something-or-other .Net class.
OK, I don't know what you're talking about here - best guess is that it requires a .NET cryptography class ? If so, then you could write a COM component in managed C++, or even C#, and call it from ASP. That might be a more integrated approach, if you need a .NET class, not ASP.NET per se, use ASP for the whole site, and get .NET involved via COM.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Here are the objects that are required for the CAC stuff (you're right, it's crypto stuff):
using System.Security.Permissions;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
What I was planning on doing was putting the classic asp stuff into an "authenticated" folder, and controlling access via .Net. Is there anything on CP that talks about what you're suggesting? I'm gonna go ahead and look, but I'll come back to this thread if I don't find anything.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
What I'm talking about is pretty broad, so I doubt there are *specific* articles.
1 - when I did classic ASP, I mostly worked in C++, and wrote the middle tier code, which the actual site accessed via COM
2 - you can write COM components in C#, ASP shouldn't care what they are written in, so this provides a bridge from classic ASP to .NET code, without having to write part of the site in ASP.NET.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
I have created a method which uploads a file to a directory of my choice, (will be a webserver soon), and it stores the file name to my database table
i want to be able to pull the file name from my database and pass it into a prefixed <img src="c:\test"/>
how wouldi format the img tag address so that I can pass my address into the img tag
i am guessin it needs to be something like this
<img src="c:\test" <%imageStore%>/>
the image store being a string
cheers boyindie
|
|
|
|
|
Well you could do that, though it needs to be
but why not use an asp:Image control instead, and set it's ImageUrl property to imageStore in your code?
|
|
|
|
|
hello.
is is possible to edit the code of .aspx file while running the application?
Thanks in advance
|
|
|
|
|
ciacia wrote: is is possible to edit the code of .aspx file while running the application?
Yes. If you have the relevant file permissions you can alter an ASPX file. However, it isn't wise to permit that level of access as it would remove some of the protection set up to prevent websites from being attacked.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
can you please tell me how do I achive it? I am surrently debugging my code so every time loading the page takes lot of time . Also I have one more question to ask... I want to execute sql statement to compare two dates on my web page with the one in the database
strsql = "select * from emp where My_date >= " & FDAte & " and Mydate >= " & TDate
where Fdate and Tdate are strings containing valid date.I tried using ' and also #
|
|
|
|
|
ciacia wrote: can you please tell me how do I achive it?
It is very unwise. It also opens your application to more security concerns. Things that ASP.NET and IIS would have taken care off for you but you now have to handle yourself.
ciacia wrote: I want to execute sql statement to compare two dates on my web page with the one in the database
strsql = "select * from emp where My_date >= " & FDAte & " and Mydate >= " & TDate
where Fdate and Tdate are strings containing valid date.I tried using ' and also #
And this question shows that you don't have a sufficient understanding of security. Any guidance that I could give on your problem in the space of a forum post wouldn't be enough to protect you from yourself.
You might want to read up on security before you go much further with this project.
The first thing to read is about SQL Injection attacks and you are vulnerable to that right now. See SQL Injection Attacks and tips on how to prevent them[^]
I'm sorry this doesn't answer your question, but there are other things you really need to learn first, in my opinion.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Hi CodeProject Team,
Can anyone help me to understand +/- of both? I know people usually say go for the language where you have more skill set, background etc... But i need to understand more capablity(technical) of each others...
So anmyone?
Amit
|
|
|
|
|
What ever one you favour - They are so close it really make no significant difference.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
I'll second Colin's answer above....
In the pre- .NET days there was a big differnece, but now all the .NET languages reference the same classes/framework, and (unlike before) VB too is (or can be) properly compiled (it used to be psuedo-compiled and then that was dealt with on the run; the so-called Just-In-Time compiler.)
So the differences are much less relevant now in .NET, and for the majority of "everyday" applications it really is a matter of personal choice which you prefer to use. I would suggest that unless your understanding pf programming is such that you already know the answer to your question, then you aren't likely to be programming anything that makes one language a technically better choice than another. So go for the one you prefer.
There is no doubt that VB is an easier language to learn. Many C# programmers equate that with being simplistic itself, which is a somewhat simplistic argument.... make no mistake: VB.NET is an extremely powerful language.
|
|
|
|