>                <input type = "button" class ="stButton" value="Select"
>language ="javascript" onclick = "SelectIt('<%#
>DataBinder.Eval(Container.DataItem, "Login")%>','<%#
>DataBinder.Eval(Container.DataItem, "FirstName")%> <%#
>DataBinder.Eval(Container.DataItem, "LastName")%>' )"/>

Rahul,

Are those line breaks for real? I don't think you can have line breaks like
that in script blocks unless you use the line continuation character
(underscore).

I have been using template columns without any of the problems you
described. However, if you insert a new server control in HTML mode, you
have to switch to design mode and save the aspx to be able to get the
corresponding declaration in the codebehind inserted automatically for you.

But I have had the ASPX page *disappear* without any reason more than once.
Don't know why, but VS.Net just zaps my work and shows a blank ASPX page
sometimes. Thank goodness for source safe.

Brijesh


On Tue, 30 Apr 2002 08:11:41 -0700, Guha, Rahul <[EMAIL PROTECTED]>
wrote:

>Nobody answered this. Is it because nobody faced it or I am missing
>something or just I was not clear ?
>However I found more problems in VS.Net IDE when using template column and
>switching between design and html view ... sometimes your declarations in
>the code behind cs file just disappear in this switching process. You gotta
>again include them ...
>
>
>-----Original Message-----
>From: Guha, Rahul [mailto:[EMAIL PROTECTED]]
>Sent: Monday, April 29, 2002 10:02 AM
>To: [EMAIL PROTECTED]
>Subject: [DOTNET] Possible VS.Net bug ... in templatecolumn
>
>Gentlemen,
>
>Let me describe a scenario which seems to me a reproducible bug in VS.Net :
>
>I am creating a ASP.Net web app in c#. In the aspx page ( or in ascx ), in
>the design mode I add some kind of data bound server side control ( like a
>datalist / datagrid ). Then use the templatecolumn for that data component
>which is bound with a dataset. Now, while creating the itemtemplate, I need
>to dynamically create the html ... so I have to use the DataBinder for
that.
>For example, below is a typical itemtemplate:
>
>
><ItemTemplate>
>        <table>
>        <tr>
>        <td align="left" valign="center">
>                <input type = "button" class ="stButton" value="Select"
>language ="javascript" onclick = "SelectIt('<%#
>DataBinder.Eval(Container.DataItem, "Login")%>','<%#
>DataBinder.Eval(Container.DataItem, "FirstName")%> <%#
>DataBinder.Eval(Container.DataItem, "LastName")%>' )"/>
>        </td>
>.... ( more similar items )
>        </tr>
></table>
></ItemTemplate>
>
>After I add this type of itemcolumn, and try to go back to design mode, I
>can't ... it says
>Could not open in Design View. Quote values differently inside a <% ... %>
>block.
>That was fine ... I can live with that, although now you have to write any
>UI items in HTML view.
>But now if you add any htmlelement ( like a hidden form variable ) and make
>it runat server, and try to populate that from server side ( in the code
>behind cs file ), it generates an error ( saying it can't find that element
>in the namespace ). But if you switch to design view ( by temporarily
>deleting the above Item Column ) and then again switch to html view and
>recreate the Item Col, it starts recognizing the new html element which
runs
>at server.
>
>This happens pretty consistently ... I happen to bump into this and found
>the work around .. but just wanted to share with you guys and save some of
>your head banging frustration ( which I had to do ). Also I would love to
>know if I am missing something in this whole context ...
>
>Thanks
>Rahul

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to