Saturday, March 31, 2012

Why is my store procedure not working in web browser?

Below is the store producedure that I use:

IFexists(SELECT [Outlook].[ID], [Outlook].[title], [Outlook].[name], [Outlook].[issueID]FROM [OLissue], [Outlook]WHERE([Outlook].[issueID]= @dotnet.itags.org.OLissueIDAND [Outlook].[issueID]= [OLissue].[issueID]))

SELECT [ID], [title], [name], [issueID]FROM [Outlook]WHERE([issueID]= @dotnet.itags.org.OLissueID)

ELSE

SELECTTOP 1NULL ID,'No parent page yet' titleFROM [Outlook]

The store procedure above works fine when run in Microsoft SQL Server Manager Studio but when run in the browser it's not working. Here is the Outlook table:

Column NameDate TypeAllow NullsIDintUncheckedmenubitCheckedmnuOrderintCheckedmnuLevelintCheckedparentintCheckedissueIDintUncheckedmasterPagevarchar(100)UncheckedvisiblebitCheckednamevarchar(50)Checkedtitlevarchar(250)Uncheckeddescriptionvarchar(1000)CheckedsummarytextCheckedcontentstextCheckedimagevarchar(50)CheckedimgCaptionvarchar(1000)CheckedapprovebitCheckedcreateDatedatetimeUnchecked

And the OLissue table:

Column NameDate TypeAllow NullsissueIDintUncheckednamevarchar(50)Uncheckedtitlevarchar(100)Checkeddescriptionvarchar(500)CheckedcrntIssuebitCheckedfrntPageintCheckedarchivedbitCheckednavOrderintCheckeddateCreatedatetimeChecked

Now, let me explain further how my web application works. I have two SqlDataSource controls in my .aspx page. The sqlOLpage control is to retrieve all the data in the Outlook table. The sqlParent control is set to use the above store procedure. In my .aspx page, I have a FormView control. In the Edit/Insert mode, I have a drop down list (ddlParent). The ddlParent DataSourceID is set to equal the sqlParent control. However, this ddlParent is set to Bind with the sqlOLpage control. I kept getting this error when enter the Edit mode:

'ddlParent' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.ArgumentOutOfRangeException: 'ddlParent' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

This error occurs when the Outlook.parent and the OLissue.frntpage field is NULL. However, what I don't understand is why is it that SQL Server Management Studio returns the record that is in the Outlook table fine.

Again, thank so much for any help.

the drop downlist takes aarguments one of the is the value and the other one is the string or item that you can see on the ddl. now when your sqlproc. returns null, the value will be null on the ddl and this action is not supported. you can do this, try to give a value for the null items like 0 or something on databond time.

check this link for more information about the same challange that you have.

http://forums.asp.net/p/648074/648671.aspx

hope this will help you


Thanks! I'll take a look at the link. However, what I do not understand is that the SP returns a valid value (not null) when run in SQL Server Management Studio. And yes, the DDL's display value is set totitle and the data field value is set toID and both of these records and the rest of the selecedt records returned fine when ran in sql mgmt. studio. So why is it not returned when using with a DDL control?


Okay, I test the sqlParent control inside of VS.net and it does return a valid record but still receive the error when running the whole page in the browser.


Okay, the problem seems to be coming from the dropdownlist control and not my store procedure. But if the SP does return a value, why is the dropdownlist having problem selecting?


Okay, I think got it...but still need help. I narrow the problem to the data binding. When the ID of SelectedValue in the DDL does not equal the returned value of the SP, it generates this error. If set the DDL control to unbound and I enter the edit mode fine without any errors and the DDL does show the returned value from the SP. So my question is, how do I avoid this error when in this situation and list the returned value from the SP but still binding to a database field?


Okay, by careful look at the scenareo again, I'm still confused about the DropDownList selectedValue property. Here is I did a test of the problem.

<asp:DropDownListID="DropDownList1"runat="server"DataSourceID="sqlParent"DataTextField="title"DataValueField="ID"SelectedValue='<%# Bind("ID") %>'></asp:DropDownList>

The above line generates the error stated above. If I take theSelectedValue='<%# Bind("ID") %>' out then it works fine. Now, I have a textBox like this:

<asp:TextBoxID="TextBox1"runat="server"Text='<%# Bind("ID") %>'></asp:TextBox><br/>

And the ID from the TextBox1 and DropDownList1 both equal so, why is there an error when I use the SelectedValue property on the DropDownList1?


Hi,

Based on my understanding, you want to set the SelectedValue to the DropDownList which exists in the FormView. When you set the value which be retrieved from database to the SelectedValue property, you get the error message above. If I have misunderstood you, please feel free to let me know.

We need to understand the DropDownList's SelectedValue property first. When we set the value to SelectedValue property, we have to make sure that the DropDownList contains this value. If it don't contain this value, we will get the error message above.

For more information, seeDropdownlist in a Gridview and the default (null) value problem.

I hope this helps.


Hey, thanks! That article seems to solves my problem for now. However, if I do Value="", will I get a null value insert into the database field? I data field is setup to accept null so it will be nice if it is null and not blank.


Okay, I just encounter the problem to my previous question. It seem that since the Value="", when I try to insert new record, there is a popup window kept telling me that I have the data in the wrong format. How do I resolve this error? How do I enter a null value is I didn't choose anything?


Any other idea, anyone?

Why is my XML file being written corrupt?

In our CMS, every time a page is updated, we spit out a new XML file.
This file is written via a function that queries the Database using a
recursive function, grabs the data, and writes out a file using
xmltextwriter:
Dim fs As New
System.IO.FileStream(System.Web.HttpContext.Current.Server.MapPath("/mjb05/x
ml/"
& siteID & "/siteMenu.xml").ToString, IO.FileMode.Open, IO.FileAccess.Write,
IO.FileShare.Read)
objXMLWriter = New System.xml.XmlTextWriter(fs, Nothing)
'objXMLWriter = New
System.xml.XmlTextWriter(System.Web.HttpContext.Current.Server.MapPath("/mjb
05/xml/"
& siteID & "/siteMenu.xml").ToString, Nothing)
objXMLWriter.Flush()
objXMLWriter.Formatting = objXMLWriter.Formatting.Indented
objXMLWriter.Indentation = 3
objXMLWriter.WriteStartDocument()
objXMLWriter.WriteComment("Created on " & Now())
objXMLWriter.WriteStartElement("menuItems")
createParentNode = False
...etc.
This works 99% of the time. However, if I change a particular value in one
of my table cells the writer still executes, but then writes out an invalid
ending to the file.
What is REALLY odd is that I can re-write the file a second time and it
fixes itself.
What is even odder (yes, it gets odder) is the way the file is corrupted.
It's appending a weird bit of broken nodes to the end of the file.
For instance, if my file SHOULD end like this:
</endNode>
</endAllItems>
the corrupted file might look like this:
</endNode>
</endAllItems>
</endNode>
</endAllItems>
or this:
</endNode>
</endAllItems>endNode>
</endAllItems>
or even just this:
</endNode>
</endAllItems>s>
Anyone have any ideas what could cause this type of weird corruption when
writing out an XML file?
-Darrel> This works 99% of the time. However, if I change a particular value in one
> of my table cells the writer still executes, but then writes out an
> invalid ending to the file.
Some more info:
I've looked at the data in the db when writing:
data record 1 = writes XML file
data record 2 = writex XML file
return to data record 1 = writes CORRUPTED file
write again with data record 1 = writes XML file
In all instance, the same variables are passed to the function that writes
out the xml file.
In addition, the corruption is random but consistent (make sense? ;o)
It's always one or two (possibly partial) repeats of the last node and the
parent node closing tags at the end of the file.
-Darrel
darrel wrote:
> Some more info:
> I've looked at the data in the db when writing:
> data record 1 = writes XML file
> data record 2 = writex XML file
> return to data record 1 = writes CORRUPTED file
> write again with data record 1 = writes XML file
> In all instance, the same variables are passed to the function that writes
> out the xml file.
> In addition, the corruption is random but consistent (make sense? ;o)
> It's always one or two (possibly partial) repeats of the last node and the
> parent node closing tags at the end of the file.
> -Darrel
>
To me it looks like a logic fault in your recursive functions. It might
be there is a fault in how elements are being closed and taken care of.
Step through the code for a small XML file and see where the problem is.
> To me it looks like a logic fault in your recursive functions. It might
> be there is a fault in how elements are being closed and taken care of.
> Step through the code for a small XML file and see where the problem is.
I'll give it a shot. However, my function is using xmlwriter to write out
individual nodes so even if it is a logic error, it's hard to figure out why
it would be writing half-tags.
I'll report back!
-Darrel

Why is my XML file being written corrupt?

In our CMS, every time a page is updated, we spit out a new XML file.

This file is written via a function that queries the Database using a
recursive function, grabs the data, and writes out a file using
xmltextwriter:

Dim fs As New
System.IO.FileStream(System.Web.HttpContext.Curren t.Server.MapPath("/mjb05/xml/"
& siteID & "/siteMenu.xml").ToString, IO.FileMode.Open, IO.FileAccess.Write,
IO.FileShare.Read)
objXMLWriter = New System.xml.XmlTextWriter(fs, Nothing)
'objXMLWriter = New
System.xml.XmlTextWriter(System.Web.HttpContext.Cu rrent.Server.MapPath("/mjb05/xml/"
& siteID & "/siteMenu.xml").ToString, Nothing)
objXMLWriter.Flush()
objXMLWriter.Formatting = objXMLWriter.Formatting.Indented
objXMLWriter.Indentation = 3
objXMLWriter.WriteStartDocument()
objXMLWriter.WriteComment("Created on " & Now())
objXMLWriter.WriteStartElement("menuItems")
createParentNode = False

...etc.

This works 99% of the time. However, if I change a particular value in one
of my table cells the writer still executes, but then writes out an invalid
ending to the file.

What is REALLY odd is that I can re-write the file a second time and it
fixes itself.

What is even odder (yes, it gets odder) is the way the file is corrupted.
It's appending a weird bit of broken nodes to the end of the file.

For instance, if my file SHOULD end like this:

</endNode>
</endAllItems
the corrupted file might look like this:

</endNode>
</endAllItems>
</endNode>
</endAllItems
or this:

</endNode>
</endAllItems>endNode>
</endAllItems
or even just this:

</endNode>
</endAllItems>s
Anyone have any ideas what could cause this type of weird corruption when
writing out an XML file?

-Darrel> This works 99% of the time. However, if I change a particular value in one
> of my table cells the writer still executes, but then writes out an
> invalid ending to the file.

Some more info:

I've looked at the data in the db when writing:

data record 1 = writes XML file
data record 2 = writex XML file
return to data record 1 = writes CORRUPTED file
write again with data record 1 = writes XML file

In all instance, the same variables are passed to the function that writes
out the xml file.

In addition, the corruption is random but consistent (make sense? ;o)

It's always one or two (possibly partial) repeats of the last node and the
parent node closing tags at the end of the file.

-Darrel
darrel wrote:
>> This works 99% of the time. However, if I change a particular value in one
>> of my table cells the writer still executes, but then writes out an
>> invalid ending to the file.
> Some more info:
> I've looked at the data in the db when writing:
> data record 1 = writes XML file
> data record 2 = writex XML file
> return to data record 1 = writes CORRUPTED file
> write again with data record 1 = writes XML file
> In all instance, the same variables are passed to the function that writes
> out the xml file.
> In addition, the corruption is random but consistent (make sense? ;o)
> It's always one or two (possibly partial) repeats of the last node and the
> parent node closing tags at the end of the file.
> -Darrel
>
To me it looks like a logic fault in your recursive functions. It might
be there is a fault in how elements are being closed and taken care of.
Step through the code for a small XML file and see where the problem is.
> To me it looks like a logic fault in your recursive functions. It might
> be there is a fault in how elements are being closed and taken care of.
> Step through the code for a small XML file and see where the problem is.

I'll give it a shot. However, my function is using xmlwriter to write out
individual nodes so even if it is a logic error, it's hard to figure out why
it would be writing half-tags.

I'll report back!

-Darrel

Why is my web site generating App_Data folder?

I created a Web Application Project in VS 2005.
The site is working fine in the development computer.
Then I transfer all my files and dll to the production computer.
I have a login form. If I try to log in, the production computer
automatically generates an App_Data folder (the development computer
doesn't have this folder at all) and it also generates an error saying
that I don't have SQL Server 2005, which of course I don't, I'm not
using it in any way.

The error I get is:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)

So my questions are, why does the production site generates the
App_Data folder and why does the site looks for SQL Server 2005?

ThanksHi Hugo,

Is there anything in your web.config or in your code that uses Profiles,
Roles, or Membership? ASP.NET will try to create the ASPNETDB.mdf database
for you when it encounters code that requires it. That database goes into
the App_Data folder.

http://msdn2.microsoft.com/en-us/li...membership.aspx
Ken
Microsoft MVP [ASP.NET]

"Hugo Flores" <hugo.flores@.ge.comwrote in message
news:1156296556.478687.77100@.m79g2000cwm.googlegro ups.com...

Quote:

Originally Posted by

>I created a Web Application Project in VS 2005.
The site is working fine in the development computer.
Then I transfer all my files and dll to the production computer.
I have a login form. If I try to log in, the production computer
automatically generates an App_Data folder (the development computer
doesn't have this folder at all) and it also generates an error saying
that I don't have SQL Server 2005, which of course I don't, I'm not
using it in any way.
>
The error I get is:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)
>
So my questions are, why does the production site generates the
App_Data folder and why does the site looks for SQL Server 2005?
>
Thanks
>


No, I'm not using profiles at all, nothing on my web.config that has
anything to do with that.
Now, I've also checked that this only happens if my login fails.
I also have the new Login control, would that be causing the problem?
Do you think if I remove the Login control and use my own login form,
would solve the problem?

Ken Cox [Microsoft MVP] wrote:

Quote:

Originally Posted by

Hi Hugo,
>
Is there anything in your web.config or in your code that uses Profiles,
Roles, or Membership? ASP.NET will try to create the ASPNETDB.mdf database
for you when it encounters code that requires it. That database goes into
the App_Data folder.
>
http://msdn2.microsoft.com/en-us/li...membership.aspx
>
Ken
Microsoft MVP [ASP.NET]
>
"Hugo Flores" <hugo.flores@.ge.comwrote in message
news:1156296556.478687.77100@.m79g2000cwm.googlegro ups.com...

Quote:

Originally Posted by

I created a Web Application Project in VS 2005.
The site is working fine in the development computer.
Then I transfer all my files and dll to the production computer.
I have a login form. If I try to log in, the production computer
automatically generates an App_Data folder (the development computer
doesn't have this folder at all) and it also generates an error saying
that I don't have SQL Server 2005, which of course I don't, I'm not
using it in any way.

The error I get is:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)

So my questions are, why does the production site generates the
App_Data folder and why does the site looks for SQL Server 2005?

Thanks


Hi Hugo,

Yes, the Login control is almost certainly causing ASP.NET to implement the
Membership system:

"If you use login controls, they will automatically use the membership
system to validate a user."

http://msdn2.microsoft.com/en-us/library/yh26yfzy.aspx
Try implementing your own and see what happens?

Ken
Microsoft MVP [ASP.NET]

"Hugo Flores" <hugo.flores@.ge.comwrote in message
news:1156302779.713734.286680@.p79g2000cwp.googlegr oups.com...

Quote:

Originally Posted by

No, I'm not using profiles at all, nothing on my web.config that has
anything to do with that.
Now, I've also checked that this only happens if my login fails.
I also have the new Login control, would that be causing the problem?
Do you think if I remove the Login control and use my own login form,
would solve the problem?
>
>
Ken Cox [Microsoft MVP] wrote:

Quote:

Originally Posted by

>Hi Hugo,
>>
>Is there anything in your web.config or in your code that uses Profiles,
>Roles, or Membership? ASP.NET will try to create the ASPNETDB.mdf
>database
>for you when it encounters code that requires it. That database goes into
>the App_Data folder.
>>
>http://msdn2.microsoft.com/en-us/li...membership.aspx
>>
>Ken
>Microsoft MVP [ASP.NET]
>>
>"Hugo Flores" <hugo.flores@.ge.comwrote in message
>news:1156296556.478687.77100@.m79g2000cwm.googlegro ups.com...

Quote:

Originally Posted by

>I created a Web Application Project in VS 2005.
The site is working fine in the development computer.
Then I transfer all my files and dll to the production computer.
I have a login form. If I try to log in, the production computer
automatically generates an App_Data folder (the development computer
doesn't have this folder at all) and it also generates an error saying
that I don't have SQL Server 2005, which of course I don't, I'm not
using it in any way.
>
The error I get is:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)
>
So my questions are, why does the production site generates the
App_Data folder and why does the site looks for SQL Server 2005?
>
Thanks
>


>


Yep,

Implementing my own login, solved the problem, thank you very much

Ken Cox [Microsoft MVP] wrote:

Quote:

Originally Posted by

Hi Hugo,
>
Yes, the Login control is almost certainly causing ASP.NET to implement the
Membership system:
>
"If you use login controls, they will automatically use the membership
system to validate a user."
>
http://msdn2.microsoft.com/en-us/library/yh26yfzy.aspx
>
Try implementing your own and see what happens?
>
Ken
Microsoft MVP [ASP.NET]
>
"Hugo Flores" <hugo.flores@.ge.comwrote in message
news:1156302779.713734.286680@.p79g2000cwp.googlegr oups.com...

Quote:

Originally Posted by

No, I'm not using profiles at all, nothing on my web.config that has
anything to do with that.
Now, I've also checked that this only happens if my login fails.
I also have the new Login control, would that be causing the problem?
Do you think if I remove the Login control and use my own login form,
would solve the problem?

Ken Cox [Microsoft MVP] wrote:

Quote:

Originally Posted by

Hi Hugo,
>
Is there anything in your web.config or in your code that uses Profiles,
Roles, or Membership? ASP.NET will try to create the ASPNETDB.mdf
database
for you when it encounters code that requires it. That database goes into
the App_Data folder.
>
http://msdn2.microsoft.com/en-us/li...membership.aspx
>
Ken
Microsoft MVP [ASP.NET]
>
"Hugo Flores" <hugo.flores@.ge.comwrote in message
news:1156296556.478687.77100@.m79g2000cwm.googlegro ups.com...
I created a Web Application Project in VS 2005.
The site is working fine in the development computer.
Then I transfer all my files and dll to the production computer.
I have a login form. If I try to log in, the production computer
automatically generates an App_Data folder (the development computer
doesn't have this folder at all) and it also generates an error saying
that I don't have SQL Server 2005, which of course I don't, I'm not
using it in any way.

The error I get is:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)

So my questions are, why does the production site generates the
App_Data folder and why does the site looks for SQL Server 2005?

Thanks


Why is no one answering my queries..

Hi,

I have a datalist control and within the Itemplate I
have a radiobuttonlist control . I am binding data to the
datalist control in Page_load . Also I have sqldatareader
object that needs to be binded to the radiobutton list. I
am not able to bind the datareader to the radiobuttonlist
control as it is within the Itemtemplate. I am new
to .Net. Could someone please let me know what I should be
doing to bind the data to the radiobuttonlist within the
Itemtemplate.
When I try binding it, I get the following error:

System.NullReferenceException: Object reference not set to
an instance of an object.

Thanks..ani wrote:
> Hi,
>
> I have a datalist control and within the Itemplate I
> have a radiobuttonlist control . I am binding data to the
> datalist control in Page_load . Also I have sqldatareader
> object that needs to be binded to the radiobutton list. I
> am not able to bind the datareader to the radiobuttonlist
> control as it is within the Itemtemplate. I am new
> to .Net. Could someone please let me know what I should be
> doing to bind the data to the radiobuttonlist within the
> Itemtemplate.
> When I try binding it, I get the following error:
> System.NullReferenceException: Object reference not set to
> an instance of an object.
> Thanks..

You can do so by adding an event handler for the ItemDataBound event.
In that event, you can reference the e.Item and e.Item.DataItem...you
have to find your control in the item template, so you do a

((DataRow)e.Item.DataItem).FindControl("yourctlname")

I believe...note the dataitem is cast to a DataRow as I assumed I bound
my datalist to a DataTable. Then cast this whole expression to the type
of control you are using...

Note this assumes the control you're looking for is not inside another
naming container in the template...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Why is MyControl.ToolTip In a <span> Tag?

I'm trying to set the title attribute on a CheckBox and I'm having some
issues in ASP.NET 1.1.
The title attribute in the following example is valid in HTML 4.01
Transitional:
<input id="MyCheckBox" type="checkbox" title="ToolTip">
However, ASP.NET doesn't like it. No matter what I do, ASP.NET places
my control inside of a span tag with the title attribute set in the
span, instead:
<span title="ToolTip"><input id="MyCheckBox" type="checkbox"></span>
I've tried Setting the title in HTML, setting the ToolTip property of
the CheckBox, as well as attempting to use the
MyCheckBox.Attributes.Add("title", "ToolTip") method.
All of them have resulted in the same HTML output.
What's going on?
Thank you in advance,
Seanthe checkbox is an abstracted control. like most of the asp.net control, it
generates a span to contain any of the internal rendered html. if you add
attributes, they are applied to the span. type the html control version if
you need this level of control. in version 2.0, tooltip support has benn
added.
-- bruce (sqlwork.com)
"Fao, Sean" <enceladus311@.yahoo.comI-WANT-NO-SPAM> wrote in message
news:%234L%23%23MrIGHA.1288@.TK2MSFTNGP09.phx.gbl...
> I'm trying to set the title attribute on a CheckBox and I'm having some
> issues in ASP.NET 1.1.
> The title attribute in the following example is valid in HTML 4.01
> Transitional:
> <input id="MyCheckBox" type="checkbox" title="ToolTip">
> However, ASP.NET doesn't like it. No matter what I do, ASP.NET places my
> control inside of a span tag with the title attribute set in the span,
> instead:
> <span title="ToolTip"><input id="MyCheckBox" type="checkbox"></span>
> I've tried Setting the title in HTML, setting the ToolTip property of the
> CheckBox, as well as attempting to use the
> MyCheckBox.Attributes.Add("title", "ToolTip") method.
> All of them have resulted in the same HTML output.
> What's going on?
> Thank you in advance,
> --
> Sean

Why is MyControl.ToolTip In a <span> Tag?

I'm trying to set the title attribute on a CheckBox and I'm having some
issues in ASP.NET 1.1.

The title attribute in the following example is valid in HTML 4.01
Transitional:

<input id="MyCheckBox" type="checkbox" title="ToolTip"
However, ASP.NET doesn't like it. No matter what I do, ASP.NET places
my control inside of a span tag with the title attribute set in the
span, instead:

<span title="ToolTip"><input id="MyCheckBox" type="checkbox"></span
I've tried Setting the title in HTML, setting the ToolTip property of
the CheckBox, as well as attempting to use the
MyCheckBox.Attributes.Add("title", "ToolTip") method.

All of them have resulted in the same HTML output.

What's going on?

Thank you in advance,

--
Seanthe checkbox is an abstracted control. like most of the asp.net control, it
generates a span to contain any of the internal rendered html. if you add
attributes, they are applied to the span. type the html control version if
you need this level of control. in version 2.0, tooltip support has benn
added.

-- bruce (sqlwork.com)

"Fao, Sean" <enceladus311@.yahoo.comI-WANT-NO-SPAM> wrote in message
news:%234L%23%23MrIGHA.1288@.TK2MSFTNGP09.phx.gbl.. .
> I'm trying to set the title attribute on a CheckBox and I'm having some
> issues in ASP.NET 1.1.
> The title attribute in the following example is valid in HTML 4.01
> Transitional:
> <input id="MyCheckBox" type="checkbox" title="ToolTip">
> However, ASP.NET doesn't like it. No matter what I do, ASP.NET places my
> control inside of a span tag with the title attribute set in the span,
> instead:
> <span title="ToolTip"><input id="MyCheckBox" type="checkbox"></span>
> I've tried Setting the title in HTML, setting the ToolTip property of the
> CheckBox, as well as attempting to use the
> MyCheckBox.Attributes.Add("title", "ToolTip") method.
> All of them have resulted in the same HTML output.
> What's going on?
> Thank you in advance,
> --
> Sean