 |
 |
Index ‹ Web Programming ‹ ASP.Net
|
- Previous
- 1
- ASP.Net >> combination of SiteMap and cookieless sessions/forms based securitHi All
I've already posted this on the forums, but thought I'd try for a wider
audience as well. I've added cookieless security to my ASP.NET 2.0 site. The
URLs are rewritten to include the cookies for the Session and the Forms
authentication token. However, the URLs driven from the Web.sitemap file are
not modified.
Questions:
1. Is this a bug?
2. Is it a know bug?
3. What's the workaround...
Regards
Nigel
- 2
- ASP.Net >> Visual studio 2005 HTML design view bugsHi,
I have had a lot of problems getting web pages, master pages and
content pages to render in VS2005 design view the same as they would in
Internet Explorer. I did a lot of looking on the internet for answers
but didn't have much luck. Anyway I believe I have found the causes of
the problems and thought I should share them in case any one else is
feeling the pain and also to find out what other peoples opinions are,
on whether these are bugs with VS2005 that should be fixed by
Microsoft.
******************************************************************
1. CSS incorrectly applied to Content and ContentPlaceHolder controls
VS2005 incorrectly applies CSS styles to asp:content and
asp:contentplaceholder controls in design view. As a result the design
view does not accurately display what will be rendered in the browser.
To recreate this problem do the following:
1. Create a simple stylesheet file called test.css
2. Place the following in the CSS file
td {
font-size: 25%;
background-color: #0AAE8B;
}
3. In VS2005 create a MasterPage with a single ContentPlaceHolder and a
<link> to the CSS file <link rel='stylesheet' href='test.css'
type='text/css'/>
4. Create a content page based on the created MasterPage
5. put some text in the in the asp:content control
6. Run the content page so that it can be viewed in Internet Explorer
7. In VS2005 view the content and MasterPage in design view
In VS2005 design view both the asp:content and asp:contentpalaceholder
have a bluish background and small font. However, when you run the
page in Internet Explorer the text is normal size and the background is
white.
I believe that this problem may be happening because the asp:content
and asp:contentplaceholder controls are being rendered as <table> for
display in VS2005 design view but they are not rendered at all when
output to Internet Explorer
This bug means that developers cannot see what the page will look like
without having to run it in Internet Explorer. It is possible to work
around the bug by modifying the <td> entry in the CSS file but the
problem with this is that the CSS file is set by the Marketing and web
teams which means it is not easily changed and if changed may break the
look and feel of older web apps.
**********************************************************************************************************
2. Comments affect the display of the page
Putting a comment in front a <!DOCTYPE> tag causes the page to render
differently in Internet Explorer as opposed to VS2005 design view
To recreate do the following:
1. Create a simple stylesheet file called test.css
2. Place the following in the CSS file
body
{
font-size: 25%;
}
.ApplicationName {
background-color: #0F4E8A;
font-size: 400%;
color: #FFFFFF;
}
3. In VS2005 create a web page.
4. Put in the following <link> tag. <link rel='stylesheet'
href='test.css' type='text/css'/>
5. Put in the following tags
<table>
<tr>
<td class="ApplicationName">
aaaa
</td>
</tr>
</table>
6. Add the following comment after <%Page> but before <!DOCTYPE>
<!-- This is a comment that should affect nothing -->
7. Look at the page in VS2005 design view and then run it so that it is
viewed in Internet Explorer.
a. Notice that the text when displayed in Internet Explorer is much
larger than when viewed in VS2005 design view.
8. Move the comment below the <!DOCTYPE> tag
9. Look at the page in VS2005 design view and then run it so that it is
viewed in Internet Explorer.
a. Notice that the text is now the same when displayed in Internet
Explorer and VS2005 design view.
VS2005 design view and Internet Explorer 6 handle the html comment <!--
This is a comment that should affect nothing --> differently. I am not
sure which one is handling it correctly, but one of them is definitely
wrong.
*********************************************************************************************
3. CssClass property of ASP controls is not accurately displayed
VS2005 design view does not render a page in the same way as Internet
Explorer when an ASP control with a "CssClass" property is inside a
html tag with a "class" attribute.
To recreate do the following:
1. Create a simple stylesheet file called test.css
2. Place the following in the CSS file
.ApplicationName {
background-color: #0F4E8A;
font-size: 200%;
color: #FFFFFF;
}
3. In VS2005 create a web page.
4. Put in the following <link> tag. <link rel='stylesheet'
href='test.css' type='text/css'/>
5. Put in the following tags
<p class="ApplicationName">
<asp:Label ID="Label1" CssClass="ApplicationName"
runat="server" Text="ApplicationName"></asp:Label>
</p>
6. Look at the page in VS2005 design view and then run it so that it is
viewed in Internet Explorer.
a. Notice that the text when displayed in Internet Explorer is much
smaller than when viewed in VS2005 design view.
It appears as if VS2005 design view is applying both the style
specified in "class" attribute and the style specified in the
"CssClass" attribute so that the text "ApplicationName" is displayed at
400%. Internet Explorer, however, applies only one of the styles so
that the text "ApplicationName" is displayed at 200%.
Once again I am not sure if it is VS2005 or Internet Explorer which is
correct but one of them is definitely wrong.
Thanks,
- 3
- ASP.Net >> Growl- frustrating - update function DOESN'T DO ANYTHINGI am feeling frustrated and I am willing to bet its something stupid but I
could really use some help.
I have a class called anEvent. On my web form I have a button which creates
a new anEvent and loads the form data into the new event. It then sends that
event to a class function to try and update the data in the database. When
I hit the button, it appears that nothing happens, no error message, just a
return to the previous state of the controls. I have tried catching errors,
using try - catch to see if something is failing somewhere but have gotten
bascially nowhere. I have tried simplifying the query so much that its
"update tblevents set eventname= @eventname where eventid=@eventid" and
still nothing happens. Please help if you can. Thanks in advance!!
Class:
Public Class anEvent
Public EventName As String
Public Location As String
Public StartDate As DateTime
Public EndDate As DateTime
Public Address As String
Public City As String
Public State As String
Public Zip As String
Public Phone As String
Public ContactPhone As String
Public ContactName As String
Public ContactEmail As String
Public RoomRate As String
Public ReservationCode As String
Public STatus As Integer
Public DateOpened As DateTime
Public Dateclosed As DateTime
Public Additional As String
Public EventID As Integer
End Class
CodeBehind for button:
Private Sub btnUpdateThisEvent_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnUpdateThisEvent.Click
Dim CurrentEvent As New anEvent
Dim URLString As String
CurrentEvent.EventName = txtEventName.Text
CurrentEvent.Location = txtLocation.Text
CurrentEvent.Address = txtAddress.Text
CurrentEvent.City = txtCity.Text
CurrentEvent.State = txtState.Text
CurrentEvent.Zip = txtZip.Text
CurrentEvent.Phone = txtPhone.Text
CurrentEvent.StartDate = txtStartDate.Text
CurrentEvent.EndDate = txtEndDate.Text
CurrentEvent.ContactName = txtContactName.Text
CurrentEvent.ContactPhone = txtContactPhone.Text
CurrentEvent.ContactEmail = txtContactEmail.Text
CurrentEvent.Additional = txtAdditional.Text
CurrentEvent.RoomRate = txtRoomRate.Text
CurrentEvent.ReservationCode = txtReservationCode.Text
CurrentEvent.STatus = ddlStatus.SelectedItem.Value
CurrentEvent.EventID = txtEventID.Text
E_VentManager.EventsDB.UpdateEvent(CurrentEvent)
End Sub
Code for: E_ventManager.EventsDB.UpdateEvent:
Public Shared Function UpdateEvent(ByVal CurrentEvent As anEvent) As Boolean
Dim conEvents As New SqlConnection
conEvents.ConnectionString =
ConfigurationSettings.AppSettings("ConnectionString")
Dim cmdEvents As New SqlCommand
cmdEvents.CommandType = CommandType.StoredProcedure
cmdEvents.CommandText = "spUpdateEvent"
cmdEvents.Connection = conEvents
cmdEvents.Parameters.Add("@EventName", CurrentEvent.EventName)
cmdEvents.Parameters.Add("@Location", CurrentEvent.Location)
cmdEvents.Parameters.Add("@StartDate", CurrentEvent.StartDate)
cmdEvents.Parameters.Add("@EndDate", CurrentEvent.EndDate)
cmdEvents.Parameters.Add("@Address", CurrentEvent.Address)
cmdEvents.Parameters.Add("@City", CurrentEvent.City)
cmdEvents.Parameters.Add("@State", CurrentEvent.State)
cmdEvents.Parameters.Add("@Zip", CurrentEvent.Zip)
cmdEvents.Parameters.Add("@pHONE", CurrentEvent.Phone)
cmdEvents.Parameters.Add("@ContactName", CurrentEvent.ContactName)
cmdEvents.Parameters.Add("@ContactPhone", CurrentEvent.ContactPhone)
cmdEvents.Parameters.Add("@ContactEmail", CurrentEvent.ContactEmail)
cmdEvents.Parameters.Add("@RoomRate", CurrentEvent.RoomRate)
cmdEvents.Parameters.Add("@ReservationCode", CurrentEvent.ReservationCode)
cmdEvents.Parameters.Add("@Additional", CurrentEvent.Additional)
cmdEvents.Parameters.Add("@Status", CurrentEvent.STatus)
cmdEvents.Parameters.Add("@EventID", CurrentEvent.EventID)
conEvents.Open()
cmdEvents.ExecuteNonQuery()
conEvents.Close()
End Function
- 4
- IIS >> HttpInitialize fails on XPSP2Couldn't really find a more appropriate newsgroup for this....
HttpInitialize with HTTP_INITIALIZE_SERVER works on my server2003 and
several xpsp2 machines, except for my development machine. I even removed
and reinstalled sp2 but still get ERROR_INVALID_PARAMETER on this one box.
Has anyone seen this or know what the problem might be?
- 5
- ASP.Net >> A new member- Testing to Development.Hello All,
This is Ravi here. I have just joined this group. It seems very
interesting and full of help and knowledge. I am very interested in
learning ASP.net. I am currently learning VB.net. I am looking forward
for guidance from you all in learning ASP.net. I am currently into
testing and product support. Is it possible for me to do programming.
Kindly Guide me.
Will be regularly messaging. Plan to be in programming very soon. If
you know any tutoials for beginners in ASP.net. Plz inform me.
Ravi
- 6
- 7
- ASP.Net >> ExceptionsHello,
I am writing a custom error page for my web application
and I need to inform the user of the line number and the
page name where an error occurs (like it does in the
standard ASP.NET error page) but the exception class does
not contain these details, does anyone know how I can get
these?
Many thanks
Robert
- 8
- ASP.Net >> VS 2005 web site web.config rejected by IIS as badly formed. "Child Nodes not allowed" error given.I created a simple web site in VS 2005 and then copied it underneath the IIS
tree and created a virtual directory for it. When I try to access the
default.aspx page I get the below error text:
Note that this is the default web.config file generated by the application.
The OS is Windows Server 2003, released version of VS 2005, created an
Asp.Net file system web site that does not do anything special and deployed
it to test.
Server Error in '/Metrics2' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: Child nodes are not allowed.
Source Error:
Line 25: <compilation debug="true" strict="false" explicit="true"/>
Line 26: <pages>
Line 27: <namespaces>
Line 28: <clear/>
Line 29: <add namespace="System"/>
Source File: C:\Inetpub\wwwroot\Metrics2\web.config Line: 27
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET
Version:1.1.4322.2300
- 9
- ASP/Active Server Pages >> Windows 2003 Server ASP extensions not recognisedHi,
I have two servers, both running windows 2003 and both containing the exact
same properties for IIS.
I have a set of asp intranet pages that are located inside the
c:\inetpub\wwwroot\test folder.
On one of the servers, the asp pages run fine, however on the second server
the asp files are not recognised as asp pages. If you double click them,
windows pops up a message box stating "Windows cannot open this file".
If I try to view an asp page via the browser, I get page not found.
I have IIS installed, and under Web Service Extensions I have allowed every
item that can be set.
Does anyone know why windows cannot make an association with the asp page?
Many thanks.
- 10
- ASP.Net >> IE and NN - Appearence Differs?I am using VS.NET to design my web form.
<asp:button id="Button1" style="Z-INDEX: 102; LEFT: 213px; POSITION:
absolute; TOP: 253px" runat="server" BackColor="White" BorderColor="White"
Text="Welcome" Font-Names="Arial" Font-Size="X-Small"
CssClass="style1"></asp:button>
The above code gives white background button in IE 6.0. But it is not giving
so in NN 7.1. I want the appearence to be same in both IE and NN. How to go
about it.
Thanks in advance.
--
Great!!
ChristManIn
- 11
- ASP.Net >> odp.netHello,
I have a asp.net project, where I am using the ODP.NET
provider. I am referening to the dll direcly in the
program files folder. Now when I compile the project
shouldnt it create the dll for the odp.net in the bin
folder or do I have to copy it there?
Thanks
- 12
- IIS >> HostingI am trying to host a domain running win2k3. I have set the default
page and all the setups. However, when I eneter the address it only
says "parent directory". It has been about 7 days since I bought the
domain. Yahoo tells me it should take no more than 72 hours. Would
really appreciate any help.
- 13
- ASP.Net >> Sharing a ValidatorI have a form that contains a number of fields, all of which have
validators. There are two submit buttons, one to update a record and one to
add a record. Because the only difference in validation is to make sure
someone is not using a username that is already in use, I would like to be
able to use all the other validators for both the add and update buttons.
However, because as far as I know a validator can only be in one
validationgroup, that does not help me (although if they haven't already, I
think it would be a great improvement for the next version of the .NET
framework). Does anybody have any suggestions on a good way to solve my
problem (having 2 copies of each validator would work and be very simple,
but I would hope for a more efficient way)? Thanks.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
- 14
- IIS >> HTTP requestI need some basic insight into the workings of a HTTP request and a
HTTP response. i'am using ASP.net.
1. what happens when a request is sent and the user clicks the STOP
button of the browser.
a. does the request goes through to the server?
b. will any server-side code gets executed?
c. if there is any database operations, will they get executed?
the scenario here is that, there is a online shopping site which does
credit card processing with database updates.
There is a possibility that the credit card transaction goes through
before the user hits the STOP button and the database updates does
not. The end result will be stale data! Please guide.
Thanks in advance.
Sunil.B
- 15
- ASP.Net >> Detecting Downlevel BrowsersIn an ASP.NET 1.1 Web application, how can I detect - with *reasonable*
accuracy - whether any particular browser is a downlevel browser?
My objective is to insert a different menu (different User Control
containing a different menu) for downlevel vs uplevel browsers.
This is very important as I have a great DHTML menu - but on many MACs, it
doesn't work even though the vendor claims to cater to downlevel browsers.
So I'm going to generate my own menu for the downlevel browsers and need a
way to determine when to send down the simpler (downlevel) menu vs the super
duper DHTML menu.
Please note that I'm already aware that some geeks out there can force their
old or non mainstream browsers to pretend they're IE (via header mods): but
I'm not at all concerned about them. I'm more concerned about old grandmas
with old computers running old browsers (or running iMacs).
Thanks!
|
| Author |
Message |
Avalon46

|
Posted: Mon Feb 19 03:48:28 CST 2007 |
Top |
ASP.Net >> window.close in vb.net??
Hi,
If anybody could tell me what the equivalent of
window.close()
in vb.net??
Thanks,
Shivani
Web Programming52
|
| |
|
| |
 |
Eliyahu

|
Posted: Mon Feb 19 03:48:28 CST 2007 |
Top |
ASP.Net >> window.close in vb.net??
Vb.net is a server-side technology. window.close() runs on the client. The
direct answer to your question would be:
keep calling window.close() on the client side, there is no equivalent in
vb.net.
If your next question is how the server side vb.net program can get the
client-side call window.close(), look at this article:
http://usableasp.net/DeveloperPage.aspx?page=Articles/HowTo/HowToPassMessagesBetweenServerAndClient.htm
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Garg" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Hi,
>
> If anybody could tell me what the equivalent of
>
> window.close()
>
> in vb.net??
>
>
> Thanks,
> Shivani
>
|
| |
|
| |
 |
Mark

|
Posted: Mon Feb 19 04:49:42 CST 2007 |
Top |
ASP.Net >> window.close in vb.net??
"Garg" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> If anybody could tell me what the equivalent of
>
> window.close()
>
> in vb.net??
There is no equivalent - VB.NET (and C# etc) runs server-side, so has no
native ability whatever to open and close windows etc...
However, server-side code can stream client-side JavaScript which can do
this...
|
| |
|
| |
 |
| |
 |
Index ‹ Web Programming ‹ ASP.Net |
- Next
- 1
- ASP.Net >> Cookie and Session Cookie Questions.Hello,
I am working on an ASP.NET / VB web page.
How can I set a cookie in my visitor computer and also a Session Cookie?
And how can I retrieve their values?
I will run it when page loads.
Thank You,
Miguel
- 2
- 3
- ASP.Net >> IE & the select tagI have hidden the select tag successfully by layering an iframe over it
but when the page is added to the users desktop (active desktop?) the
problem comes back. Again if the same page is viewed in an IE window
the select tag is successfully hidden.
Any suggestions?
Thanks
- 4
- ASP.Net >> Hierarchal Tree Control in a comboboxOutside of building a custom ActiveX control that would need to run on the
user's machine and have security attributes set to allow such, does anyone
have any code that will allow a combobox to display a tree of items? I could
display a tree control, but that takes a lot of space on the page. I have
seen comboboxes in non-web apps uses such a thing. I want to be able to
display a tree in a compact fashion. Any ideas would be appreciated.
- 5
- ASP.Net >> TabIndexI cannot get the tab settings on an aspx page to work as desired. First of
all, I don't see a way to indicate whether a control is a tab stop. There is
a tabindex property for labels (why?). When I set a specific order for the
tabindex values that does not seem to be what happens on a page when the
user presses the tab key?
My books on asp.net don't even mention tabindex?
How do you control the focus order on an asp.net page?
Wayne
- 6
- ASP/Active Server Pages >> ASP BLOG MULTIUSERI've been looking around on the internet and have noticed there are
tons of Blog programs that support multiuser login written in PHP but
there are none for ASP.
I am just looking for a sample code that I can look through and get my
hands dirty with.
Anyone know of any ASP based Blog software with a multi user support
function?
Cheers
Sean
- 7
- ASP/Active Server Pages >> RSS update problem.Hi All,
I was able to generate an RSS for the news I provide with ASP and MS SQL
backend. When I opens it its working fine with any RSS reader, But its not
getting updated, when I update the feed. Its showing the one which I made
the day one, How to rectify and what could be the problem.
Any help is appriciated.
Regards,
Benny
- 8
- Frontpage Client >> Pop upI have this pop up that open when a button is clicked. However, when the pop
up opens there is only the ok button as a choice, I would like to add the
cancel button if the user decides to not go to the link. Can anyone help?
Thx.
--
Rafael Araya
- 9
- Frontpage Client >> Usual < problemI've read some past posts from Stephan, Kathleen and Jim
Buyens regarding this problem, but have not found the
answer.
I am building an anchor tag in an Access query and trying
to output it as an html anchor when Exporting the query
as an html file.
The data in my Access table is a code i.e. AA1
I am trying to create a string like this
<a href=" '' & [code] & ''.htm" target="_blank">Amino
Acids</a>
So the string is interpreted as an anchor in the table.
Of course, the browser replaces the < with <
How can I overcome this?
TIA, Simon
- 10
- 11
- ASP.Net >> a string variableHi group,
I'm trying to do this:
String DatVandaag;
DatVandaag=DateTime.Today.AddDays(-2).ToString("dd/MM/yyyy");
LiteralHeat.Text = "<center><H5>Wekelijkse vinyl TOP 10
("+DatVandaag+")</center></H5><br><br>";
I get the following error: Use of unassigned local variable 'DatVandaag'
Can somebody help me what I do worng ?
Thx in advance !
grz
Bernie V
--
http://www.djberniev.be
- 12
- ASP.Net >> regatding stroed procedure in asp.netHi
i've created stored procedure in
sql server 2000 which returns a value
see the stroed procedure
CREATE PROCEDURE QA_Select_AdminOrRec
@Role varchar(50),
@username varchar(50),
@pwd varchar(50)
AS
if exists (select * from
QA_Admin_Recruiter where role = @role
and username=@username and pwd=@pwd)
return (1)
else
return (0)
GO
and in asp.net i called this stroed
procedure like this
Dim username As New OleDbParameter
username.OleDbType = OleDbType.VarChar
username.Value = txtUserName.Text
Dim pwd As New OleDbParameter
pwd.OleDbType = OleDbType.VarChar
pwd.Value = txtPassword.Text
Dim role As New OleDbParameter
role.OleDbType = OleDbType.VarChar
role.Value = Session("user")
cmd.CommandText = "QA_Select_AdminOrRec"
cmd.Parameters.Add(role)
cmd.Parameters.Add(username)
cmd.Parameters.Add(pwd)
cmd.ExecuteNonQuery().
here i've to check the value returned by stored procedure.
can anyone tell me how to write code to capture a value which returned by
the stroed procedure.
thanx in advance
yoshitha.
- 13
- ASP.Net >> Publishing my webpageHi,
I've read many articles about publishing and problems with it, but nothing
about my problem.
I've written a website in VS2005 and it uses the internal webserver.
I do that at home at my own computer.
The website is an intranet site and must run on the company webserver
running IIS.
I publish the website in a folder on my pc and then email the files from
that folder to my company emailaddress. (no direct line available)
From there I write those files to the server folder of my website.
But....when I start my homepage, I get an errormessage stating I should set
"customErrors" to "off" to see what is going wrong, but when I do that, I
still get that message.
The IT people of my company did install FrameWork 2.0 on the webserver, but
probably I'm still doing something wrong.
The question is what???
Please help.
rg.
Eric
- 14
- ASP.Net >> how to use another font on remote webserverhi there,
i am using shared hosting for a website, and want to use a custom font for
my website, located in a folder, but dont know how to dynamically load it.
Any code samples appreciated for asp.net (VB)..
thanks,
Paul
- 15
- ASP.Net >> custom component across asp.net pages..I'm pretty new to .net stuff, but not new to programming (lots of vb, sql,
cold fusion, and some asp)..
I have a "middle layer" object model I created, that has all my business
rules and database access for an order entry system, starting with the Order
object, and other basic child items, like LineItems and PAyments under that.
This is being used in the vb.net front-end for normal users in the company,
but I'd like to use this for the web front-end as well in asp.net.
But I'm trying to best figure out where and how I keep the session data for
the user.
Scenario 1 - Use the object model in a passive way, where I use only
individual objects as necessary for "some" rules and db operations, and
after every web page I update data in a "shopping cart" table, and populate
the objects as necessary.
Scenario 2 - Somehow pass the Order object from page to page, which will
keep all data available, especially for those complex operation like order
totalling.
I would like to save some load on the sql server, and would prefer NOT to
have a db r/w every page access. Plus, I'm really after code reuse; but I'm
also looking for maximizing web performance.
Where do web services factor in? Is this a case where I take my "order
component" and turn it into a web service, or do I call it as just any
other object?
Thanks!
|
|
|