473,491 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IDE Sucks - Workaround?

I've searched, read and tried everything until I'm finally frustrated.
Apparently this is a known IDE weakness, and I _CANT_ seem to get around
it...

My problem is working with this line:
<A
HREF="javascript:popUp('EventLogView.aspx?ID=<%#Da taBinder.Eval(Container.Da
taItem,"ID")%>')">View</A>

The code compiles and runs fine, however when trying to switch from HTML
back to design view, I get the following IDE error:

Could not open in design view. Quote values differently inside a
'<%..."value"...%>' block.

Nothing I do gets me back to design view except removing the line.
Everything I read advised to replace double quotes with single quotes, but
I've tried every combination I can think of and it either won't compile, I
get a runtime 'badly formed' error, or the same condition where I can't get
into design view.

Please any help? Any other crafty way to make a javascript function fire
from HREF?
Nov 15 '05 #1
6 1054
actually, there is a way... put an empty Anchor tag on your form in the
designer and then just
programatically replace the href attribute to be what it needs to be in the
page's PreRender
event.
"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:OY****************@tk2msftngp13.phx.gbl...
I've searched, read and tried everything until I'm finally frustrated.
Apparently this is a known IDE weakness, and I _CANT_ seem to get around
it...

My problem is working with this line:
<A
HREF="javascript:popUp('EventLogView.aspx?ID=<%#Da taBinder.Eval(Container.Da taItem,"ID")%>')">View</A>

The code compiles and runs fine, however when trying to switch from HTML
back to design view, I get the following IDE error:

Could not open in design view. Quote values differently inside a
'<%..."value"...%>' block.

Nothing I do gets me back to design view except removing the line.
Everything I read advised to replace double quotes with single quotes, but
I've tried every combination I can think of and it either won't compile, I
get a runtime 'badly formed' error, or the same condition where I can't get into design view.

Please any help? Any other crafty way to make a javascript function fire
from HREF?

Nov 15 '05 #2
I've tried to do my own research, but I haven't been able to make this
work...

Did you mean to add a placeholder and then add an anchor tag to the
placeholder's controls programatically? I couldn't find a way to directly
add an anchor control in the designer but MSDN referenced this method, so I
was working to make it work.

Assuming this is correct (?) I added a placeholder (and several other
controls for that matter) into the template for the column in my datagrid.
The problem here, is that I can't find how to programatically access that
control then using the standard method (there isn't a control created in the
class to reference) to add the HtmlAnchor control to it...

....what am I missing?

"Ken Onweller (.NET MCSD)" <an*******@discussions.microsoft.com> wrote in
message news:eQ***************@TK2MSFTNGP10.phx.gbl...
actually, there is a way... put an empty Anchor tag on your form in the
designer and then just
programatically replace the href attribute to be what it needs to be in the page's PreRender
event.
"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:OY****************@tk2msftngp13.phx.gbl...
I've searched, read and tried everything until I'm finally frustrated.
Apparently this is a known IDE weakness, and I _CANT_ seem to get around
it...

My problem is working with this line:
<A

HREF="javascript:popUp('EventLogView.aspx?ID=<%#Da taBinder.Eval(Container.Da
taItem,"ID")%>')">View</A>

The code compiles and runs fine, however when trying to switch from HTML
back to design view, I get the following IDE error:

Could not open in design view. Quote values differently inside a
'<%..."value"...%>' block.

Nothing I do gets me back to design view except removing the line.
Everything I read advised to replace double quotes with single quotes, but I've tried every combination I can think of and it either won't compile, I get a runtime 'badly formed' error, or the same condition where I can't

get
into design view.

Please any help? Any other crafty way to make a javascript function fire from HREF?


Nov 15 '05 #3
to programmatically access a simple HTML control requires you to right-click
on the
HTML control (i.e. anchor) then select Run As Server Control. You will now
be able
to refer to this control programatically by its ID property.
"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:uC****************@TK2MSFTNGP11.phx.gbl...
I've tried to do my own research, but I haven't been able to make this
work...

Did you mean to add a placeholder and then add an anchor tag to the
placeholder's controls programatically? I couldn't find a way to directly
add an anchor control in the designer but MSDN referenced this method, so I was working to make it work.

Assuming this is correct (?) I added a placeholder (and several other
controls for that matter) into the template for the column in my datagrid.
The problem here, is that I can't find how to programatically access that
control then using the standard method (there isn't a control created in the class to reference) to add the HtmlAnchor control to it...

...what am I missing?

"Ken Onweller (.NET MCSD)" <an*******@discussions.microsoft.com> wrote in
message news:eQ***************@TK2MSFTNGP10.phx.gbl...
actually, there is a way... put an empty Anchor tag on your form in the
designer and then just
programatically replace the href attribute to be what it needs to be in the
page's PreRender
event.
"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:OY****************@tk2msftngp13.phx.gbl...
I've searched, read and tried everything until I'm finally frustrated.
Apparently this is a known IDE weakness, and I _CANT_ seem to get around it...

My problem is working with this line:
<A

HREF="javascript:popUp('EventLogView.aspx?ID=<%#Da taBinder.Eval(Container.Da
taItem,"ID")%>')">View</A>

The code compiles and runs fine, however when trying to switch from HTML back to design view, I get the following IDE error:

Could not open in design view. Quote values differently inside a
'<%..."value"...%>' block.

Nothing I do gets me back to design view except removing the line.
Everything I read advised to replace double quotes with single quotes, but I've tried every combination I can think of and it either won't
compile, I get a runtime 'badly formed' error, or the same condition where I
can't
get
into design view.

Please any help? Any other crafty way to make a javascript function

fire from HREF?



Nov 15 '05 #4
I know about the runat=server, but controls inside a datagrid template are
different. They have the runat=server parameter, but they are not directly
accesible in code. Try it, I promise!

"Ken Onweller (.NET MCSD)" <an*******@discussions.microsoft.com> wrote in
message news:%2*****************@tk2msftngp13.phx.gbl...
to programmatically access a simple HTML control requires you to right-click on the
HTML control (i.e. anchor) then select Run As Server Control. You will now be able
to refer to this control programatically by its ID property.
"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:uC****************@TK2MSFTNGP11.phx.gbl...
I've tried to do my own research, but I haven't been able to make this
work...

Did you mean to add a placeholder and then add an anchor tag to the
placeholder's controls programatically? I couldn't find a way to directly
add an anchor control in the designer but MSDN referenced this method, so
I
was working to make it work.

Assuming this is correct (?) I added a placeholder (and several other
controls for that matter) into the template for the column in my

datagrid. The problem here, is that I can't find how to programatically access that control then using the standard method (there isn't a control created in

the
class to reference) to add the HtmlAnchor control to it...

...what am I missing?

"Ken Onweller (.NET MCSD)" <an*******@discussions.microsoft.com> wrote in message news:eQ***************@TK2MSFTNGP10.phx.gbl...
actually, there is a way... put an empty Anchor tag on your form in the designer and then just
programatically replace the href attribute to be what it needs to be in
the
page's PreRender
event.
"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:OY****************@tk2msftngp13.phx.gbl...
> I've searched, read and tried everything until I'm finally
frustrated. > Apparently this is a known IDE weakness, and I _CANT_ seem to get

around > it...
>
> My problem is working with this line:
> <A
>

HREF="javascript:popUp('EventLogView.aspx?ID=<%#Da taBinder.Eval(Container.Da
> taItem,"ID")%>')">View</A>
>
> The code compiles and runs fine, however when trying to switch from HTML > back to design view, I get the following IDE error:
>
> Could not open in design view. Quote values differently inside a
> '<%..."value"...%>' block.
>
> Nothing I do gets me back to design view except removing the line.
> Everything I read advised to replace double quotes with single
quotes, but
> I've tried every combination I can think of and it either won't

compile,
I
> get a runtime 'badly formed' error, or the same condition where I

can't get
> into design view.
>
> Please any help? Any other crafty way to make a javascript function

fire
> from HREF?
>
>



Nov 15 '05 #5
I have an <asp:button> inside of an <asp:datagrid> whose properties are
being modified successfully so you
can probably adapt this to what you are trying to do....

Here's my column:

<asp:TemplateColumn>
<ItemTemplate>
<asp:Button Text="Log" CommandName = "ViewLog" Runat="server"
CommandArgument='<%#
((BatchServer.ReportJobInfo)Container.DataItem).co rrespond_id %>'
OnCommand="ViewReport_Click" enabled='<%# logEnabled(
((BatchServer.ReportJobInfo)Container.DataItem).lo gexists ) %>'/>
</ItemTemplate>
</asp:TemplateColumn>

Here's the code for the button's OnCommand handler:

protected void ViewReport_Click(object source, CommandEventArgs e)
{
if ( e.CommandName.Substring(4,3) == "Log" )
{
Response.Redirect("Log.aspx?db=" + lstDatabases.SelectedItem.Text.Trim()
+
"&job=" + e.CommandArgument);
}
else
{
string strArgument = e.CommandArgument.ToString().Substring(3);
string strType = e.CommandArgument.ToString().Substring(0,3);

string str =
lstReportPaths.Items[lstDatabases.SelectedIndex].Text.Trim();

if ( strType == "CRY" )
Response.Redirect("CrystalInfo.aspx?rpt=" + str + strArgument);
else
Response.Redirect("BatchInfo.aspx?dir=" + str + "&rpt=" + strArgument);
}
}

"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:OU****************@TK2MSFTNGP12.phx.gbl...
I know about the runat=server, but controls inside a datagrid template are
different. They have the runat=server parameter, but they are not directly accesible in code. Try it, I promise!

"Ken Onweller (.NET MCSD)" <an*******@discussions.microsoft.com> wrote in
message news:%2*****************@tk2msftngp13.phx.gbl...
to programmatically access a simple HTML control requires you to

right-click
on the
HTML control (i.e. anchor) then select Run As Server Control. You will

now
be able
to refer to this control programatically by its ID property.
"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:uC****************@TK2MSFTNGP11.phx.gbl...
I've tried to do my own research, but I haven't been able to make this
work...

Did you mean to add a placeholder and then add an anchor tag to the
placeholder's controls programatically? I couldn't find a way to directly add an anchor control in the designer but MSDN referenced this method, so
I
was working to make it work.

Assuming this is correct (?) I added a placeholder (and several other
controls for that matter) into the template for the column in my datagrid. The problem here, is that I can't find how to programatically access that control then using the standard method (there isn't a control created in the
class to reference) to add the HtmlAnchor control to it...

...what am I missing?

"Ken Onweller (.NET MCSD)" <an*******@discussions.microsoft.com> wrote in message news:eQ***************@TK2MSFTNGP10.phx.gbl...
> actually, there is a way... put an empty Anchor tag on your form in the > designer and then just
> programatically replace the href attribute to be what it needs to be in the
> page's PreRender
> event.
>
>
> "Craig" <cs******@remoovdis.kc.rr.com> wrote in message
> news:OY****************@tk2msftngp13.phx.gbl...
> > I've searched, read and tried everything until I'm finally frustrated. > > Apparently this is a known IDE weakness, and I _CANT_ seem to get

around
> > it...
> >
> > My problem is working with this line:
> > <A
> >
>

HREF="javascript:popUp('EventLogView.aspx?ID=<%#Da taBinder.Eval(Container.Da > > taItem,"ID")%>')">View</A>
> >
> > The code compiles and runs fine, however when trying to switch from
HTML
> > back to design view, I get the following IDE error:
> >
> > Could not open in design view. Quote values differently inside a
> > '<%..."value"...%>' block.
> >
> > Nothing I do gets me back to design view except removing the line.
> > Everything I read advised to replace double quotes with single quotes, but
> > I've tried every combination I can think of and it either won't

compile,
I
> > get a runtime 'badly formed' error, or the same condition where I

can't
> get
> > into design view.
> >
> > Please any help? Any other crafty way to make a javascript

function fire
> > from HREF?
> >
> >
>
>



Nov 15 '05 #6
You can access them in code, but they aren't created right away - you'll
have to trap the itemcreated or itemdatabound events, then use "
e.Item.FindControl( "controlName") " to get at the control. Once you do
this, working with the items is very easy.


"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:OU****************@TK2MSFTNGP12.phx.gbl...
I know about the runat=server, but controls inside a datagrid template are
different. They have the runat=server parameter, but they are not directly accesible in code. Try it, I promise!

"Ken Onweller (.NET MCSD)" <an*******@discussions.microsoft.com> wrote in
message news:%2*****************@tk2msftngp13.phx.gbl...
to programmatically access a simple HTML control requires you to

right-click
on the
HTML control (i.e. anchor) then select Run As Server Control. You will

now
be able
to refer to this control programatically by its ID property.
"Craig" <cs******@remoovdis.kc.rr.com> wrote in message
news:uC****************@TK2MSFTNGP11.phx.gbl...
I've tried to do my own research, but I haven't been able to make this
work...

Did you mean to add a placeholder and then add an anchor tag to the
placeholder's controls programatically? I couldn't find a way to directly add an anchor control in the designer but MSDN referenced this method, so
I
was working to make it work.

Assuming this is correct (?) I added a placeholder (and several other
controls for that matter) into the template for the column in my datagrid. The problem here, is that I can't find how to programatically access that control then using the standard method (there isn't a control created in the
class to reference) to add the HtmlAnchor control to it...

...what am I missing?

"Ken Onweller (.NET MCSD)" <an*******@discussions.microsoft.com> wrote in message news:eQ***************@TK2MSFTNGP10.phx.gbl...
> actually, there is a way... put an empty Anchor tag on your form in the > designer and then just
> programatically replace the href attribute to be what it needs to be in the
> page's PreRender
> event.
>
>
> "Craig" <cs******@remoovdis.kc.rr.com> wrote in message
> news:OY****************@tk2msftngp13.phx.gbl...
> > I've searched, read and tried everything until I'm finally frustrated. > > Apparently this is a known IDE weakness, and I _CANT_ seem to get

around
> > it...
> >
> > My problem is working with this line:
> > <A
> >
>

HREF="javascript:popUp('EventLogView.aspx?ID=<%#Da taBinder.Eval(Container.Da > > taItem,"ID")%>')">View</A>
> >
> > The code compiles and runs fine, however when trying to switch from
HTML
> > back to design view, I get the following IDE error:
> >
> > Could not open in design view. Quote values differently inside a
> > '<%..."value"...%>' block.
> >
> > Nothing I do gets me back to design view except removing the line.
> > Everything I read advised to replace double quotes with single quotes, but
> > I've tried every combination I can think of and it either won't

compile,
I
> > get a runtime 'badly formed' error, or the same condition where I

can't
> get
> > into design view.
> >
> > Please any help? Any other crafty way to make a javascript

function fire
> > from HREF?
> >
> >
>
>



Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2554
by: klappnase | last post by:
Hello everyone, there have already been a couple of threads about IDLE's sometimes annoying disability to use special characters (in my case I would like to use for example german umlauts like...
0
1759
by: Jonas Smithson | last post by:
<div style="position: relative;> <!-- I'm the parent --> blah blah blah <div style="position: absolute; bottom: 0;> <!-- I'm the child --> blah blah blah </div> </div> The bottom of the...
49
3145
by: Relaxin | last post by:
It is just me or has MS created some of the worst ways to access and display data? You can use a DataSet, but if you want to sort or filter the data to must use a DataView which is created from...
30
2906
by: Neil Zanella | last post by:
Hello, Allow me to share my frustrations with GNU g++. This is the second time something similar happens to me: I can't find anything wrong with my C++ program and yet I get segfaults, and...
761
27978
by: Neo-LISPer | last post by:
Hey Recently, I researched using C++ for game programming and here is what I found: C++ game developers spend a lot of their time debugging corrupted memory. Few, if any, compilers offer...
16
2207
by: zwetan | last post by:
Hi, often I see people telling that "javascript sucks" - is it because of the DOM with JS ? - is it because of the language in itself ? - is it because browsers/hosts differences ? - is it...
7
1304
by: Justin Shen | last post by:
the output of the following codes is "greater than zero", which is rather strange! the correct one should be "not greater than zero" int a = 0x79de61c0; //2044617152; a += 0x12345678; //a is...
1
2153
by: slyi | last post by:
Hi All, Does anyone use vml to force the printing of background-colors in IE clients? Regards, slyi eg: <html xmlns:v="urn:schemas-microsoft-com:vml" >
0
304
by: Dachshund Digital | last post by:
Has any one figured out how to override the WriteEntry or show change the actual output? I am sorry, but putting the DATE/TIME PROCESS # and Thread # information AFTER the 'Message' text just...
0
1415
by: William Johnston | last post by:
Hi, A support technician proposed a workaround to black images created for thumbnails. The code to create a thumbnail is below: //passes results to Response.OutputStream private void...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.