|
Have you solved this? Look around on MSDN?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I have gone trough some of the demos on asp.net and I wanted to show off my work.
When I run the program through the Microsoft Visual Web Developer 2008, i am able to create a web page called:
http://localhost:56535/DDLists/
how do I present this to users so that they can see this page on their machine?
|
|
|
|
|
You need to copy it onto a computer that is running IIS and that is set up to publish to the web. VWD has a built in web server for local use, IIS is the program that comes with XP Pro and certain editions of Vista, and is used to publish to the web.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have read a lot of hype about how great the new javascript support in Visual Studio 2008 is, but I am having a hard time getting it to recognize my custom javascript objects. I haven't done much work with custom javascript objects and I suspect the problem is that I simply am not defining them the way Visual Studio wants to see them.
Heres how I am building a custom object (in an seperate.js file):
function MyClass()<br />
{<br />
<br />
this.myStringMember = "";<br />
this.myMethod = function(aParameter)<br />
{<br />
alert(this.myStringMember + " " + aParameter);<br />
}<br />
}
then in my web page i instatantiate an instance
var o = new MyClass();<br />
o.myStringMember = "Chuck";<br />
o.myMethod("races");
when I type o. in the webpage javascript the intellisense list only contains the method: constructor
I am referencing the seperate .JS file using <script type="text/javascript" src="JS/JScript1.js"></script> and I tried putting /// <reference path="JS/JScript1.js" /> at the top of my webpages javascript block.
If I define the class inside code block of the webpage's javascript then intellisense works as expected with my methods and datamemebers. What am I doing wrong? Or is that VS08 simply doesn't understand custom objects from external .JS files?
Thanks,
Matt
|
|
|
|
|
hi,
i developed a asp site for experiments/practice which is look like as
http://ansarishan.tripod.com/1.bmp
http://ansarishan.tripod.com/2.bmp
but when i upload the Default.aspx on tripod by the help of filemanager then Default.aspx display on explorer as
http://ansarishan.tripod.com/Default.aspx
----------------
i know i am wrong ,because i am new but you are experienced ... please solve my problem
|
|
|
|
|
Looks like these people are stripping your css. Find a real host is probably the solution.
You should view source of your local copy and the one they are serving, then you can work out where it's changing and what the issue is.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am in the process of creating a website where users fill out a "Request Form" and submit it. Only thing is I don't remember how to insert information into my database after the user has submitted the information. I am using MS Server 2003, I have my request database/tables already created and I am using C#. Also, for 'easy maintenance' in the future should i be creating stored procedures as well? Right now I have a User ID text box, User Email text box, Submit Button, and User Request text box. Please help!! It has been almost 2 years since I've worked with ASP.NET. Its slowly coming back to me. Thanks for the help
|
|
|
|
|
AhLaJ77 wrote: I don't remember how to insert information into my database
AhLaJ77 wrote: It has been almost 2 years since I've worked with ASP.NET.
Has it been that long since you last used Google? Have you forgotten how? Maybe you've forgotten how to type?
only two letters away from being an asset
|
|
|
|
|
|
Here's where you want to start:
http://msdn2.microsoft.com/en-us/library/ms254937.aspx[^]
Once you've read through that you can use the Request property of your ASP.NET page to get the data being submitted from the user to your web server and update your database. Here's a sample to give you an idea of what you're trying to understand how to do from the documentation above:
<br />
using(SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["sqlserver"].ConnectionString)){<br />
using(SqlCommand cmd = new SqlCommand("SELECT rowId, FirstName, LastName FROM someTable WHERE rowId = @Id")){<br />
cmd.Parameters.Add("@Id", SqlDbType.Int);<br />
cmd.Parameters["@Id"].Value = int.Parse(Request.QueryString["rowId"]);<br />
<br />
SqlDataReader rdr = cmd.ExecuteReader();<br />
while(rdr.Read()){<br />
Response.Write(String.Format("rowId: {0}", rdr[0]));<br />
Response.Write(String.Format("FirstName: {0}", rdr[1]));<br />
Response.Write(String.Format("LastName: {0}", rdr[2]));<br />
}<br />
}<br />
}<br />
Additionally, lookup the syntax for SELECT, INSERT, UPDATE and DELETE in SQL Server Books Online (aka. BOL).
|
|
|
|
|
I will definately do my research on this to gain a better knowledge about ADO.NET (since i've never messed with it). Ur my hero mark miller! Thanks!!!!
Update: 4:52 PM
btw I did my search on ADo.NET and found EXACTLY what I needed!!
modified on Monday, March 17, 2008 4:52 PM
|
|
|
|
|
AhLaJ77 wrote: I only was taught the basics in college
Obviously the basics of research were not taught in your college.
AhLaJ77 wrote: i've continously used google to search for this.
Pitiful and painful to see the quality of graduates being produced.
This simple query[^] located 367,000 resources.
only two letters away from being an asset
|
|
|
|
|
its also painful to see how obnoxious programmers still are
|
|
|
|
|
I'm hurt you didn't give him this[^].
Hey, I wonder - if people do use this as a response, doesn't that mean my article will have lots of links to it, and will therefore score high in google searches ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Just waiting for Chris to add it as the #2 post on all forums.
only two letters away from being an asset
|
|
|
|
|
Does anyone know how to convert a string to a double within the SELECT statement of a SqlDataSource?
The data source is a SQL Server database and the values in the fields are all strings. The major problem is that in the Datalist, all of the leading zeros are displayed. Plus I do need to compute one item from three fields.
Thanks for you help
Gene
|
|
|
|
|
|
Thanks for the response, but I get the error message
"InCorrect Syntax"
It changes CAST(D1.UNIT_RATE AS DECIMAL(10, 2)) AS Rate,
to: [CAST](D1.UNIT_RATE AS [DECIMAL](10, 2)) AS Rate,
I am working in Visual Web Developer and it seems that not all of the functionality of SQL Server is available.
Gene
|
|
|
|
|
I have a PlaceHolder Object in asp page that is filled with several Controls (of different types). How can I retrieve the Data in this Controls after I reloaded the page.
<br />
<tr><br />
<td><br />
<asp:PlaceHolder ID="PLForCostumColumns" runat="server" EnableViewState="True"></asp:PlaceHolder><br />
</td><br />
</tr><br />
the code behind:
<br />
foreach (AbstractCostumField acf in cols.Cols)<br />
{<br />
Label lbl = new Label();<br />
lbl.Text = caps.readCaption(acf.CaptionId);<br />
this.PLForCostumColumns.Controls.Add(lbl);<br />
this.PLForCostumColumns.Controls.Add(acf.darstellen());<br />
Literal lit = new Literal();<br />
lit.Text = "<br />";<br />
this.PLForCostumColumns.Controls.Add(lit);<br />
}<br />
the abstractcostumfields method "darstellen" delivers a WebControl.
|
|
|
|
|
you need to insert these values before page load, otherwise they will not be part of the viewstate tree, and then you won't ever be able to access them.
If they are just labels, it would make more sense to put a literal in there and fill it with all the text from all the labels you are creating.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I was able to successfully create a so-called virtual directory on the c Drive of my remote server, but when I try to call it up via a borwser it doesn't work. Specifically:
The domain is "subdomain.abc.com" which resides on my D drive. I created the VD, "Test" on C Drive. But when I type the url "subsomain.abc.com/Test", I get a 404 error. Anyone have a clue what stupid thing I am doing? Here's the code:
Private Sub CreateVirtualDir(ByVal WebSite As String, ByVal AppName As String, ByVal Path As String)
Dim IISSchema As New System.DirectoryServices.DirectoryEntry("IIS://" & WebSite & "/Schema/AppIsolated")
Dim CanCreate As Boolean = Not IISSchema.Properties("Syntax").Value.ToString.ToUpper() = "BOOLEAN"
IISSchema.Dispose()
If CanCreate Then
Dim PathCreated As Boolean
Try
Dim IISAdmin As New System.DirectoryServices.DirectoryEntry("IIS://" & WebSite & "/W3SVC/1/Root")
'make sure folder exists
If Not System.IO.Directory.Exists(Path) Then
System.IO.Directory.CreateDirectory(Path)
PathCreated = True
End If
'If the virtual directory already exists then delete it
For Each VD As System.DirectoryServices.DirectoryEntry In IISAdmin.Children
If VD.Name = AppName Then
IISAdmin.Invoke("Delete", New String() {VD.SchemaClassName, AppName})
IISAdmin.CommitChanges()
Exit For
End If
Next VD
'Create and setup new virtual directory
Dim VDir As System.DirectoryServices.DirectoryEntry = IISAdmin.Children.Add(AppName, "IIsWebVirtualDir")
VDir.Properties("Path").Item(0) = Path
VDir.Properties("AppFriendlyName").Item(0) = AppName
VDir.Properties("EnableDirBrowsing").Item(0) = True
VDir.Properties("AccessRead").Item(0) = True
VDir.Properties("AccessExecute").Item(0) = True
VDir.Properties("AccessWrite").Item(0) = True
VDir.Properties("AccessScript").Item(0) = True
VDir.Properties("AuthNTLM").Item(0) = True
VDir.Properties("EnableDefaultDoc").Item(0) = True
VDir.Properties("DefaultDoc").Item(0) = "default.htm,default.aspx,default.asp"
VDir.Properties("AspEnableParentPaths").Item(0) = True
VDir.CommitChanges()
'the following are acceptable params
'INPROC = 0
'OUTPROC = 1
'POOLED = 2
VDir.Invoke("AppCreate", 1)
Catch Ex As Exception
If PathCreated Then
System.IO.Directory.Delete(Path)
End If
Throw Ex
End Try
End If
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
CreateVirtualDir("localhost", "Test", "c:\Test")
End Sub
PS: If it's the "localhost" that is doing it and that should be replaced with "subdomain.abc.com", understand I tried that but got a cryptic, "System.Runtime.InteropServices.COMException: Access is denied."
Anyone know what I am doing wrong?
|
|
|
|
|
I've two scenarios:
1) Using Javascript to create a expandable/collapsible list, that flickers when the page reloads - e.g. when the edit button on a gridview is clicked.
2) Using panels for links, when the expand button is clicked - it displays one panel, when the collapse button is clicked - it displays the other. But that too, off course does the same - the unwanted flickering.
I'm sure there are ways to prevent.
Would anyone please give some hint?
Thanks.
Ekjon
|
|
|
|
|
What do you mean by "flickers"?
Of course, when a button is clicked in the gridview a postback will be generated. Unless the button is an html inout control.
only two letters away from being an asset
|
|
|
|
|
Hello Mark,
Thanks for your response.
My question is - we want the postback, but can we prevent the flickering, meaning that "look" of reloading of the page?
I have seen pages like that, but don't know how.
Any idea?
Ekjon
|
|
|
|
|
AJAX. Look at the UpdatePanel for starters.
only two letters away from being an asset
|
|
|
|