|
Please try the VB forum, this.
Migration has been made many of times I'm sure, but for any reasonably sized project I doubt the conversion can be fully automatic.
|
|
|
|
|
In most cases I've seen it wasn't worth migrating from VB6 to VB.NET. Redesign and re-engineer the application to make use of better methodologies available with .NET
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Don't
It is far harder than you will ever think.
There are commercial products available that say they can do it for you, but this is not entirely true.
They can do parts, but the languages are not just superficially different, they are fundimentally different.
Easier to rewrite the thing from scratch.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
I suspect I know which, but a) I fell down a programming hole till 3am so I'm questioning myself heavily b) I was a mostly an ASP.NET/backend dev 2001-2007, then I switched to desktop/backend, so I'm still ASP.NET rusty & getting back into it... I would like CPville's take on this bitof our architecture:
- We remoce the normal, built-in resource manager that gets the file from its physical location given the URL
-
We replace it with our own Manager which:
- Takes a specially coded URL
- Decodes it to an actual URL to get the resource
For example the URL of out home button is
http://www.uop.edu.jo/ResourceManager.axd?file=ucvozmcg&type=9&path=~/tonzvpkoy
but really is should be
/webimages/homeicon.gif
The filename and path are split up and run through a simple substitution cipher (see my blog for how secure that is) and the extension is given a numerical value (e.g. 1= .css 2 = .gif). The net result is that we are running extra code just to get resources lowering perfomance, the URL is longer, and [worst] the developers can't tell what is coming from where. The resource manager doesn't BTW, it just maps semi-obstifucated information to the actual loaction, so it is not even looking after where things are stored.
Other than a cack-handed attempt at securing something that doesn't needed are there any advantages to this approach, above job security?
|
|
|
|
|
With a sufficiently long file name, it would be hard to brute force get files. But with the example you gave (ucv0zmcg), that may be open to brute forcing. Supposing the method of jumbling the file names was secure and you added some extra data to make the jumbled data (encrypted, hopefully) long, then it may make it harder for people to randomly get files.
There are better (more secure) ways, but that seems like one potential advantage. Another "advantage" would be that the encrypted data may be base64 encoded or something, so you don't have to worry about funky characters being in the URL. You could just do the base64 encoding, but hey you wanted advantages so that's one.
Also, it makes it harder for somebody to get random files on the server. Though, a better way to do that would be to associate an ID to each file path and use that ID in the URL to look up the file. That way, you only serve up files that have been explicitly allowed by the database.
|
|
|
|
|
Thanks for the input, what is happening on our site is so odd that I'm second guessing myself, along the lines of "This is so stupid I must be missing something". The only reasons I could come up are pretty much yours (except the one about getting random files on the server).
The cryptography we have is a joke, I would've understood what was happening if the Original "Programmer" had encrypted with any degree of sense , but take a look at my blog entry (here[^]) to see what he actually did. Brute force would have long strings encrypted our way in no time, though it is be quicker to work out the cipher with the little grey cells! Curiously r maps to r, so I doubt he checked the cipher properly.
I could also understand if the resource manager actually managed resources putting them/getting them from somewhere more exotic than the web folder structure like a file server or a Database or something, but it doesn't even do that. Frankly, this is bit is only the tip of the iceberg, and I have to figure out how to migrate the damned thing to something that can actually be maintained.
|
|
|
|
|
Hi All,
I am developing one website. In That I want to call a popup window on dropdown_selectedIndexChaged.
If I put That DropDown in an Anchor tag The Window Opens As Soon As I Click On DropDown Which I Dont Want.
I Want that Popup Should Open After Selecting The Value Of That DropDown.
So Please Help Me To Solve My Problem.
And is there any way to write Anchor Tag in code behind and Call It On dropdown_selectedIndexChaged To Open A Popup.
My Anchor tag Is Like This :
<a id="AA1" runat="server" class="thickbox" title="" href="InventoryQty.aspx?action=add&TB_iframe=true&height=420&width=700">
<asp:DropDownList ID="InsertDDLItem1" runat="server"
AppendDataBoundItems="true"
DataTextField="ItemName"
DataValueField="ItemID"
AutoPostBack="true"
OnSelectedIndexChanged="InsertDDLItem1_SelectedIndexChanged" Width="280px">
<asp:ListItem Selected="True" Value="0">Select ITem Type</asp:ListItem>
</asp:DropDownList>
</a>
Please Help Me To Solve My Problem.
Thanks & Regards
Sanket Patil
.
|
|
|
|
|
This would best be implemented using JavaScript and handling the onchange event there to open the new window.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
First of all, get rid of the anchor tag. You'll need to use the onchange event to initiate some JavaScript to open a window. You'll have to modify it a bit to work with your code, but this is some code I had laying around that you can use:
<script type="text/javascript">
function HandleDDClick(element) {
if(element.selectedIndex > 0) {
var url = element.options[element.selectedIndex].value;
window.open(url);
}
}
</script>
<asp:DropDownList runat="server" onchange="HandleDDClick(this)">
<asp:ListItem Text="Select an item..." />
<asp:ListItem Text="Google" Value="http://www.google.com" />
<asp:ListItem Text="Microsoft" Value="http://www.microsoft.com" />
</asp:DropDownList>
|
|
|
|
|
Oh man,if you have the dropdownlist's autopostback on ,then you will get the popup very hard. you can register your popup code in the indexchabged event.or just like above,you can write the popup code in the client,and register the popupcode into the dropdownlist ,and use the onchange event to trigger.
I can do!
|
|
|
|
|
Hi All,
I have a gridview with auto generate column
<asp:gridview id="gridPayDetailReport" runat="server" cellpadding="4"
="" cellspacing="1" backcolor="GrayText" rowstyle-wrap="false" enablemodelvalidation="True" forecolor="#333333" gridlines="None" onrowdatabound="gridPayDetailReport_RowDataBound">
I am binding dataset to the grid using stored procedure, where columns are dynamic.
I need to do total in the footer except for first column.
Please help me with this..
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
|
We have an application that uses a Radiobuttonlist of 36 items for the user to identify a Reason for a visit. This application has been in use for over 3 years and has created over 40,000 records in a MS-SQL Table. The users of this application would like to recude the number of Reasons in the Radiobuttonlist down to 11. Besides online access, they are able to generate various stat reports using this data.
How can I do this and still bring up records that contain Reasons that are no longer on the Radiobuttonlist without generating an SQL exception?
I don't think it can easily be done. If I could hide the no longer in use reasons, I could use code behind to show these reasons in a separate field on the screen rather than in the Radiobuttonlist as a selected item. Same thing for the reports.
I hope this makes sense. Any advise will be much appreciated.
|
|
|
|
|
Best thing to do is have your user do a mapping from Old reason to new reason, then clean the data and enable the new 11 radio buttons.
For example:
Old reason = A, New reason=B
Old reason = B, New Reason=B
Old reason = C, New Reason=X
you get the idea.
Good luck
|
|
|
|
|
I understand what you are saying. Can't see a magic way to handle this. Thank you for the prompt reply.
|
|
|
|
|
Dears
Any body help me about master page.
i build 2 pages with command master page.
and master page have 2 links for 2 pages.
Normaly when i click on master page first link then open first page and when i click on master page second link then open second page.
In this process whole page refress.
I need when i click on master page link then refress only contact page not a master page.
|
|
|
|
|
well...
the page inherits the masterpage so when you click the link the page reloads the masterpage also.
Maybe if all of the page is in an updatepanel you do not see it flicker.
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I think you need further reading on Master Pages and Content Pages.
A content page inherits from its master page but both are rendered as one
page before it's sent to the client. The client browser (e.g. FireFox, IE)
does not differentiate between a master and content page as everything is sent as one
page e.g. Default.aspx.
There are methods such as:
- AJAX,
- Scripting (Script Manager/Update panel)
- IFrames
which can help u with partial page rendering.
Good Luck!
|
|
|
|
|
Since upgrading I'm seeing some strange results when querying against my web.sitemap file. Since most of my navigation is based on my web.sitemap file, this means many of my pages aren't loading.
When I query against the web.sitemap file, I'm getting back incorrect values for the url property. So if I run the following code
SiteMapNode rootNode = SiteMap.Provider.RootNode;
labTest.Text = rootNode.Url;
I would expect to read back "~/default.aspx", but instead I get back:
/(A(RAVFN-5DzAEkAAAANzE4MWZlMmUtYWI5OC00Nzg5LTk5YmMtNmEwNWRl NjAxYjU4KwIMaNwwBgRI9_M39CTz q6EZY7U1))/default.aspx
This means when I try to build my website navigation dynamically it fails because I cannot find sitemap nodes by url:
SiteMapNode footballNode = SiteMap.Provider.FindSiteMapNode("~/default.aspx");
The above statement fails because it reads back a url with the crazy string in front. What makes matters worse it that the problem is sporatic. It usually fails for awhile, then once it starts working it works for awhile, then I check back and it's broke again (all without changing any code).
|
|
|
|
|
Hi,
In my application i have a search criteria field in which one document name field is there.
I have a document in my database with name $#%#$. Now, I want to search for document by entering only %.
How i do that?
I tried differnt things but its not working. If i entered % in the document name field it gives me all the document.But, I want only that document.
Thanks,
Umesh Tayade
|
|
|
|
|
I can see you use the LIKE in your query.
If you only enter % you do get all. If you enter #%# I guess your result will be better.
(BTW I have never seen a filename with a % in it, maybe de-abstract you question)
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Escape it with a backslash (\), like this '\%'
|
|
|
|
|
You can use either
SELECT columns FROM table WHERE
column LIKE '%[%]%'
-- or
SELECT columns FROM table WHERE
column LIKE '%\%%' ESCAPE '\'
|
|
|
|
|
Good Dal All
i have this aspx page
<%@ Page Language="C#" Async="true" Trace="true" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form runat="server" method="post" action="https://www.vcs.co.za/vvonline/ccform.asp" >
<asp:HiddenField ID="p1" Value="4635" runat="server" />
<asp:HiddenField ID="p2" Value="2" runat="server" />
<asp:HiddenField ID="p3" Value="Some Goods" runat="server" />
<asp:HiddenField ID="p4" Value="5.00" runat="server" />
<asp:Button ID="btnSubmit" runat="server" Text="Pay by Credit Card"
/>
</form>
</body>
</html>
what happens here is that on the Client side when someone clicks the Button it will do the payment and redirect to the page, i want to do this one the server side. i tried this
protected void btnSubmit_Click1(object sender, EventArgs e)
{
string P1 = p1.Value;
string P2 = p2.Value;
string P3 = p3.Value;
String URl = "https://www.vcs.co.za/vvonline/ccform.asp?p1=" + P1 + "&p2=" + P2 + "&p3=" + P3;
WebClient svc = new WebClient();
svc.UploadStringAsync(new Uri(""), "Post", "AT");
svc.UploadStringCompleted += new UploadStringCompletedEventHandler(svc_UploadStringCompleted);
}
and
void svc_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
{
String estr = e.Result;
}
You can test using that URL
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
The testURL says:
cs Terminal Id missing No Vcs Terminal Id presented 17/05/2011 04:19:38 PM
So what is your question really?
Why don't you do a response.redirect (why asynchronous?)
Don't you need an update anel in which the data is updated after pressing the button. You do now a repost with variables while you have the values when you hit the button.
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|