|
People,
I'm currently analising a ASP classic system and proposing a migration to ASP 2.0 .Net. However, I was trying to scope the advantages of skiping .Net 2.0 and going 3.0 right on, but I can't find any article or comparison chart that states the advantages and disadvantages of 3.0.
Anyone can point me to such an article or give me some insight?
|
|
|
|
|
3.0 doesn't really changes anything from 2.0 for web development. If you are getting ready to begin development and still analyzing you may consider looking at 3.5 with Visual Studio 2008 since it offers things that actually affect web devs.
A few examples:
-Linq (if you don't know find out, it's amazing.)
-javascript debugging
-split code/design screen like DreamWeaver (Finally!)
-You get to pick the target framework (2.-, 3.0 or 3.5)
-design time support for nested master pages
If it's a fairly simple app though then 2.0 will more than suffice.
hth
Al
|
|
|
|
|
What about support to stuff like WCF?
|
|
|
|
|
3.0 will also give you better web services via WSE 3.0 so there are benefits of 3.0 over 2.0 that exist, just not much that is specific to web development. WSE and WCF are independent of the presentation. As your in development 3.5 / VS 2008 will be coming out and both 2.0/3.0 should be easy to upgrade so I don't think you can go wrong with either.
It's just a preference for me to try a use the newest version of whatever on new projects.
hth
Al
|
|
|
|
|
can anybody help out in doing manipulation after clicking "change password"
button in "changepassword" built-in control in ajax.
or any links to get it done.
Thanks in advance,
Priya.
|
|
|
|
|
Hi Priya,
What type of manipulations are you looking to achieve?
You may convert the said control to template and thereafter can do any manipulations.
Can you be a bit more specific about your requirements?
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Hi,
I have seen a couple of companies web backends and they still have seperate tables for customers and user (this would be the admin users).
Would it be wise to have both admin users and customers use the same tables? Then how would one distinguish between admin users and customers?
What is the difference between the aspnet_Membership and aspnet_Users tables?
Regards
|
|
|
|
|
.NET Enthusiast wrote: Would it be wise to have both admin users and customers use the same tables?
Yes, If there are a are in common.
.NET Enthusiast wrote: Then how would one distinguish between admin users and customers?
Easy, You woud have to have another column, witch woud specificy a class. Admin or costumer.
There is a good practice to have 2 tables, The First woud have user data, other woud have permision. But this depends for what site is being developt.
.NET Enthusiast wrote: What is the difference between the aspnet_Membership and aspnet_Users tables?
http://msdn2.microsoft.com/en-us/library/Aa478948.aspx[^]
If This isnt what you expected, search google or msdn
|
|
|
|
|
First of all i am coding a web service which returns an pdf file when retrieve a word document from the port. i have a virtual printer and wanna access the printer to locate .ps file where i want. how can i reach that printer from webservice to get file.
ty for helping...
|
|
|
|
|
I have some javascript/ajax which replaces an image in a div with another image. Works great using a regulat html button.
When I try and run the javascript function using an asp:button in c#, the new image might briefly flicker before reverting back to the original image.
I'm using Button4.Attributes.Add("onclick", "ajaxFunction(....."); to run the javascript.
Any ideas? There are some compelling reasons to want to use c# to select the actual image to substitute.
Much Thanks!
John Held
|
|
|
|
|
John Held wrote: When I try and run the javascript function using an asp:button in c#, the new image might briefly flicker before reverting back to the original image.
You are most likely changing the image in the Javascript, then changing it back using AJAX.
John Held wrote: 'm using Button4.Attributes.Add("onclick", "ajaxFunction(....."); to run the javascript.
Any ideas? There are some compelling reasons to want to use c# to select the actual image to substitute.
That will not select the image that will be displayed because of the button click, that will select the image that will be displayed the next time the button is clicked.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks for the response. I'm putting the Button4.Attributes.Add statement in the Page_Load section which seems to try to then display the new image on the first click of the button. As I say, the new image is only up for a moment before the original image redisplays.
John Held
|
|
|
|
|
John Held wrote: I'm putting the Button4.Attributes.Add statement in the Page_Load
Ok, that is correct.
John Held wrote: As I say, the new image is only up for a moment before the original image redisplays.
Yes, as I said that is most likely because you are restoring the image using AJAX.
The image tag is in the update panel, right? When the button is clicked, you are replacing the image in the Javascript, then the button click event is sent to the server using AJAX. The server creates new code for the contents of the update panel, including a new image tag with the original source. When the AJAX call returns, the newly created code is replacing the contents of the update panel, replacing the image tag that you changed from Javascript with the new image tag.
---
single minded; short sighted; long gone;
|
|
|
|
|
That makes total sense I'm afraid. Thanks much!
John Held
|
|
|
|
|
I am currently developing a web application using Microsoft's Visual Studio with C# code-behind-page. When a new item is selected in a listbox control, the display in the listbox is scrolled so the selected item appears at the top of the listbox. I would like to change this behavior so the selected item appears somewhere in the middle of the display. In this situation, it is important for the user to see the items before and after the selected item. I have been unable to figure out a way to do this. Is this possible? Thanks.
Dave
|
|
|
|
|
Although ASP.NET is new to me, I still feel foolish asking such a simple question about a common task required for millions of web sites. I've spent hours seeking the answer, but without success, probably because it's so common and simple that everyone is expected to know it.
An InformationRequired page has an 'Agree to Terms & Conditions' checkbox. If it's unchecked when the Submit button is clicked, a message box is displayed; If it's checked when the Submit button is clicked, a Content page is displayed in a new window. I can do everything except the last bit. Here's the code:
----------------------------------------------------------------------
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
'Has the visitor agreed to the T&C?
If chkTC.Checked Then
'Open new browser window for Content.aspx
CAN ANYONE PROVIDE THE CODE TO GO HERE, PLEASE?
Else
MsgBox("You must agree to the TERMS & CONDITIONS by selecting the box before proceeding.")
End If
End Sub
End Class
----------------------------------------------------------------------
|
|
|
|
|
bhssc wrote: 'Open new browser window for Content.aspx
Use Page.RegisterStartupScript(Name,Script) and inside that use window.open('your new page name')
|
|
|
|
|
One reason that you can't find any information about it, is beacuse it's impossible. You can't open a browser window from the server code, you can only do that in the browser.
You have to use Javascript to open a new window. One way is to add the script to the page the way that Navaneeth suggested.
You can't use a message box in a web application either. The message box is only displayed in the special situation where the client computer and the web server is the same computer, and the user account running the web page in the web server is the same user account where the browser is running. In other words, it only works when you are testing the site on your own computer.
---
single minded; short sighted; long gone;
|
|
|
|
|
Oh, dear me! And I thought that .NET was going to make life easy!
Thanks, friends, for saving me more wasted time.
|
|
|
|
|
bhssc wrote: Oh, dear me! And I thought that .NET was going to make life easy!
The pages are still displayed in a browser. No server technology can get around the limitations of the browser or the limitations of the server-client model. You can do a lot in ASP.NET, but you can't get around the browser.
---
single minded; short sighted; long gone;
|
|
|
|
|
I amd using the dataobject method and a gridview. I get this error when running the code:
ObjectDataSource 'ObData' could not find a non-generic method 'updateUser' that has parameters: UserID, UserFirstName, UserLastName.
I have researched this issue and applied various solutions but none of them have fixed the problem.
Here is the .aspx file:
asp:objectdatasource id="ObData" runat="server" typename="dao.userdao" selectmethod="getAllUsers" updatemethod="updateUser" >
[DataObjectMethod(DataObjectMethodType.Update)]
public static int updateUser(UserData userData)
{
MySqlCommand cmd = new MySqlCommand();
try
{
DB_Connection conn = new DB_Connection();
cmd.Connection = (MySqlConnection)conn.DBConnect();
cmd.CommandText = "updateUser";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new MySqlParameter("USERID", userData.UserID));
cmd.Parameters.Add(new MySqlParameter("USER_LAST_NAME", userData.UserLastName));
cmd.Parameters.Add(new MySqlParameter("USER_FIRST_NAME", userData.UserFirstName));
int i=cmd.ExecuteNonQuery();
return i;
}
finally
{
cmd.Connection.Close();
}
}
Here is my stored procedure in MySQL:
REATE DEFINER=`USERDB`@`%` PROCEDURE `updateUser`(IN USERID VARCHAR(7),IN USER_LAST_NAME VARCHAR(40), IN USER_FIRST_NAME VARCHAR(20)
BEGIN
UPDATE USERS SET USER_LAST_NAME = USER_LAST_NAME, USER_FIRST_NAME = USER_FIRST_NAME where USER_ID = USERID;
END
I appreciate any help.
-- modified at 9:05 Thursday 20th September, 2007
|
|
|
|
|
Look at:
newbieAl wrote: ObjectDataSource 'ObData' could not find a non-generic method 'updateUser' that has parameters: UserID, UserFirstName, UserLastName.
and:
newbieAl wrote: [DataObjectMethod(DataObjectMethodType.Update)]
public static int updateUser(UserData userData)
{
The parameters do not match!
I think you have forgotten to define the UserData as DataObjectTypeName in the DataSource.
Or you have to add the needed parameters to the UpdateUser method. Both should work.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
I thought I didn't have to pass the individual paramters and that passing the object would be suffecient. Also when I add dataobjecttypename="userdata" I get this error:
The data object type specified in the DataObjectTypeName property of ObjectDataSource 'ObData' could not be found.
|
|
|
|
|
newbieAl wrote: I thought I didn't have to pass the individual paramters and that passing the object would be suffecient.
That's correct. The DataobjectTypeName is exactly for this.
newbieAl wrote: Also when I add dataobjecttypename="userdata"
You have to set a fully qualified name: e.g. MyNamespace.MySubNameSpace.UserData
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
ok found the issue. I had quantified the datasourcetype name and forgot to drop a letter. I have the folder DataWrappers, however the system wanted to only see: DataWrapper.UserData. I had DataWrappers.UserData and it didn't like that.
|
|
|
|