locked
User Control Needs Declared RRS feed

  • Question

  • User1208829991 posted

    I am developing a web page and I inserted a hyperlink (tried linkbutton also) manually. When I go to the vb page for the code behind the page and try to type the hyperlink variable, to do the add attribute to make a popup window , the variable does not come up in the list and if I try to just type it out without the auto complete thing and run the page it gives me a error that the variable is not declared and I tried to declare the variable as a new hyperlink in the vb code but it doesnt work. Is there something I have to do so that the vb code recognize it as a hyperlink? Here is the code of the hyperlink:

     

    <DayEventTemplate>

     

    <div style="padding: 3px;">

     

     

     

     

    <asp:HyperLink ID="HyperLink1" runat="server" Text='<%#Eval("title") %>' NavigateUrl='<%# "Events_view.aspx?Eventid=" &Cstr( Eval("ID"))%>'

     

    ToolTip='<%# truncate(CStr(Eval("description"))) %>' />

     

    </div>

     

    </div>

     

    </DayEventTemplate>

    Thursday, February 25, 2010 8:51 PM

All replies

  • User-2129951835 posted

    <DayEventTemplate> ?? what is that?? if it is third party control library data template,it is normal ,because it is template,not register in Page.

    Friday, February 26, 2010 12:00 AM
  • User1208829991 posted

    Its a template that was created for the web page. I am working with a co worker on this site and I think he created a custom template. 

    Friday, February 26, 2010 11:00 AM
  • User1208829991 posted

    I think the problem I am having is since the link is in the template it is not globally declared so I can not use it in the vb coding. Is there a way to globally decalre it or another pay to have a popup window, wanting to have something similar to the showModalDialog function

    Friday, February 26, 2010 11:49 AM
  • User1208829991 posted

    I have created a small work around. I used the javascript:window.showModalDialog instead. When I put in like say Login.aspx for the url to open it works fine but when i try to open the actual page I need it says error on page for javascript. Originally I had " around 1Events_view.aspx?Eventid= and ID but I read online something to do with html not liking nested " marks but I still get the error on page. Any suggestions would be greatly appreciated.

    <asp:HyperLink ID="HyperLink1" runat="server" Text='<%#Eval("title") %>' NavigateUrl="javascript:window.showModalDialog(''<%# 'Events_view.aspx?Eventid=' &Cstr( Eval('ID'))%>'' , null , 'status=no , scroll=no')" ToolTip='<%# truncate(CStr(Eval("description"))) %>' />

    Friday, February 26, 2010 12:20 PM