|
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.
|
|
|
|
|
Yes we all are correct.
http://blogs.msdn.com/csharpfaq/archive/2004/03/11/87816.aspx
http://blogs.msdn.com/csharpfaq/archive/2004/03/11/87816.aspx
|
|
|
|
|
I think the C# Development Team is making better advances than the VBN Team is doing in the next Framework update.
I should probably say "innovation", not "advances". It would be wise to look at the planned updates in the new Framework.
|
|
|
|
|
If you're starting out, C# is better as VB is poorly designed and full of hidden traps. If you know VB already, you will know how to negotiate those traps, and the others are right, it makes no real difference
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 )
|
|
|
|
|
I know I can access, for example, the title tag directly via Page.Header ... but can I access certain tags specifically, the way you can in CSS/Javascript, similar to getElementByID?
So if you ask why not just use getElementById, it's because I need to modify the actual HTML so the spiders read the my modified changes.... also I need to get a collection of all the tags of a certain type, without knowing the exact ID names ie, get all the H3 tags and prepend the text inside those tags with a variable...
ie
<h5 class="header"> Paragraph</h5> to<br />
<h5 class="header">myvariablename Paragraph</h5><br />
<br />
can this be done?<br />
-- modified at 13:44 Friday 20th July, 2007
|
|
|
|
|
Hi
I was wondering if anyone knows how to write a method
Which will extract all the values set in an mySQL enum field and populate them into a drop down box
e.g.
order_placed | enum('Yes','No')
i would want my drop down box to be populated with the values yes/no
cheers
boyinde
|
|
|
|
|
As far as I am aware, the only way to retrieve enum values is like this:
SHOW COLUMNS FROM table_name LIKE 'enum_column_name'
This would return a data set like this:
column 0: enumColumn (the column name)
column 1: enum('yes','no') (the enum values)
column 2: yes or no, dependong on whether NULL is allowed
...other stuff
So you would need to read the SQL call into a datareader, or something, extract extract column 1 (ie the second column) and parse the value to get what ytou want- then write these to a dataset and bind that to your drowpdown...
Oh what fun!
|
|
|
|
|
sounds like a lot of borin work lol
is it possible to hardcode the values into the <asp:dropdownlist> tag?
|
|
|
|
|
What do you mean? You can hard-code dropdown values, of course....
|
|
|
|
|
Well the values that i am extracting would only be a yes/no
could i hard code these in and pass them into my enum field?
|
|
|
|
|
well of course:
<asp:DropdownList runat="server" id="ddlYesNo">
<asp:ListItem value="Yes">Yes</asp:listItem>
<asp:ListItem value="No">No</asp:listItem>
</asp:DropdownList>
Then just read the postback value and update the database as usual...
|
|
|
|
|
wot a tube forgettin bout list item
would i need to cast them to an enum value or is a string acceptable?
|
|
|
|
|
it's just a string (in your case) - eg:
update table_name set enum_column_name = 'yes'
|
|
|
|
|
Do you know if its possible to rewrite the following code for a textbox in a datagrid to a drop down list
<asp:TextBox runat="server" ID="txtUpdate" Text='<%#convert.tostring(databinder.eval(container.dataitem,"groups")) %>'></asp:TextBox>
<EditItemTemplate>
<asp:DropDownList runat=server id="listUpdate">
<asp:ListItem Value="Admin">Admin</asp:ListItem>
<asp:ListItem Value ="User" >User</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
i don't know where i can set the databinder field, so that i can send it to my update statement
|
|
|
|
|
You need to bind it in the ItemDataBound avent of the databgrid.
if your table has a column called "AccessLevel" with (enum?) values "Admin" or "User", then you could use something like the below in this (ItemDataBound) event:
If e.Item.ItemType = ListItemType.EditItem Then
Dim lstUpdate As ListBox = e.Item.FindControl("lstUpdate")
Dim dr As DataRow = e.Item.DataItem.Row, DataRowView
lstUpdate.Items.FindByValue(dr("AccessLevel")).Selected = True
End If
|
|
|
|