|
Hi,
I try to dynamically build URL to navigate:
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# BuildURLAdding() %>' >Add new </asp:HyperLink>
which uses function in my codebehind file:
protected string BuildURLAdding()
{
return @"~/PROTECTED/Annotations/AnnotationsList.aspx?ClientID=" + Request.Params["IDClient"];
}
But this is invalid (the link is un-clickable, which means that the 'NavigateUrl' was wrongly specified). Where could be a mistake?
I checked the page directive and there is everything ok:
<%@ Page Language="C#" MasterPageFile="~/SiteMaster.Master" AutoEventWireup="true"
Codebehind="AnnotationsList.aspx.cs" Inherits="Mercedes.PROTECTED.Annotations.AnnotationsList"
Title="Untitled Page" %>
Thank you very much in advance
-- modified at 14:30 Monday 21st May, 2007
|
|
|
|
|
How do you specify the NavigateUrl?
If you paste markup code, use the "Ignore HTML" option.
---
single minded; short sighted; long gone;
|
|
|
|
|
You need to resolve the url, not use "~". I assume the BuildURLAdding method is used to assign the NavigateURL property?
only two letters away from being an asset
|
|
|
|
|
I`m terribly sorry - my message wasn`t correctly posted. I have modified it already, this is correct form:
Hi,
I try to dynamically build URL to navigate:
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# BuildURLAdding() %>' >Add new </asp:HyperLink>
which uses function in my codebehind file:
protected string BuildURLAdding()
{
return @"~/PROTECTED/Annotations/AnnotationsList.aspx?ClientID=" + Request.Params["IDClient"];
}
But this is invalid (the link is un-clickable, which means that the 'NavigateUrl' was wrongly specified). Where could be a mistake?
I checked the page directive and there is everything ok:
<%@ Page Language="C#" MasterPageFile="~/SiteMaster.Master" AutoEventWireup="true"
Codebehind="AnnotationsList.aspx.cs" Inherits="Mercedes.PROTECTED.Annotations.AnnotationsList"
Title="Untitled Page" %>
Thank you very much in advance
|
|
|
|
|
|
I`m affraid that this is not the problem here. First of all, I have a working example with '~' in front of address. Second of all - I deleted this from my example and it still doesn`t work.
Any more suggestions?
|
|
|
|
|
Are you referring to this MasterPageFile="~/SiteMaster.Master" as your example.
If so it is an apples to oranges comparison, they are not the same thing. The tilda is resolved via the control.ResolveURL method. You are manually providing the url string which does not go through this method.
only two letters away from being an asset
|
|
|
|
|
I don`t understand everything you wrote, but even if I try with that method in my .cs file:
protected string BuildURLAdding()
{
string s = "www.onet.pl";
return s;
}
the hiperlink still remains invisible
|
|
|
|
|
Perhaps I missed it at the begining, you are using
<%# BuildURL() %>
which a databinding expression. Have you tried using <% =BuildURL() %>
only two letters away from being an asset
|
|
|
|
|
I tried using
<% =BuildURL() %> and <% BuildURL() %>
the effect is different - I can now see the link and even click it, but after clicking I`m getting:
HTTP Error 400 - Bad Request. - I believe the navigateUrl is not being set correctly
I`m coping here the working example that I`m having:
<asp:HyperLink ID="Link1" runat="server" NavigateUrl='<%# BuildURLForCustomer(Eval("ID"), Eval("Moves")) %>'>
protected string BuildURLForCustomer(object ob1, object ob2)
{
string pageName = "~/Cars/CarsList.aspx";
return string.Format("{0}?id={1}", ob1, ob2);
}
|
|
|
|
|
It is very interesting, why this example doesn`t work in my current project. I took it from other project where it worked...
Nevertheless, I can of course set these NagivateUrls in Load(..) method, but it`s still very interesting why this doesn`t work
|
|
|
|
|
Hello!
I set in Web Developer the CultureInvariant tag to True and still my application refuses to accept doubles with a '.' instead of a ',' Do I overlook something?
Ranger.
Novice
|
|
|
|
|
I have an updatepanel with a little animation in it and I want to trigger this when the user clicks the button in the loign control.
But everytime I add a trigger of LoginControl - OnLoggingIn it throws this error the first time the site is run (after a service start or a long period)
Sys.WebForms.PageRequestManagerParserErrorException: The message recived from the server could not be parsed. Common causes for this error are the response is modified by calls to Response.Write(), reponse filters, HttpModules, or server trace is enabled.
Details: Error parsing near '_WS/SE/Welcome.aspx|<html>
<head>
'.
Anyone know why this is? Or how to help?
|
|
|
|
|
I believe this has to do with the fact that there are a number of controls that simply cannot be used with UpdatePanel control
The following ASP.NET controls are not compatible with partial-page updates, and are therefore not supported inside an UpdatePanel control:
*
TreeView and Menu controls.
*
Web Parts controls. For more information, see ASP.NET Web Parts Controls.
*
FileUpload controls when they are used to upload files as part of an asynchronous postback.
*
GridView and DetailsView controls when their EnableSortingAndPagingCallbacks property is set to true. The default is false.
*
Login, PasswordRecovery, ChangePassword, and CreateUserWizard controls whose contents have not been converted to editable templates.
*
The Substitution control.
*
Validation controls, which includes the BaseCompareValidator, BaseValidator, CompareValidator, CustomValidator, RangeValidator, RegularExpressionValidator, RequiredFieldValidator, and ValidationSummary control.
See this for details
|
|
|
|
|
Hi
Does anyone know how to draw graphs in ASP using office tools.
Thanks in advance
|
|
|
|
|
You use Visio tools that will be very easy to draw all the graphs and other images.
Regards,
Satips.
|
|
|
|
|
Hi
Is it possible to use Visio tools from ASP . . .If so please let me know how to do that . . .
|
|
|
|
|
Hi all,
I have some queries
I have put one check box in grid.
as
<asp:templatefield headertext="Select">
<itemstyle horizontalalign="Center" width="50px">
<headerstyle width="70px" cssclass="heading">
<itemtemplate>
<asp:checkbox id="chkSelect" runat="server" cssclass="text" oncheckedchanged="Check_Clicked">
On click of this check box in the grid some event will fire
Which event is that
Can anybody tell
Thanks in advance
|
|
|
|
|
Hi all,
I have some queries
I have put one check box in grid.
as
<asp:templatefield headertext="Select">
<itemstyle horizontalalign="Center" width="50px">
<headerstyle width="70px" cssclass="heading">
<itemtemplate>
<asp:checkbox id="chkSelect" runat="server" cssclass="text" oncheckedchanged="Check_Clicked">
On click of this check box in the grid some event will fire
Which event is that
Can anybody tell
Thanks in advance
|
|
|
|
|
Try this:
<asp:TemplateField HeaderText="Add">
<ItemStyle HorizontalAlign="Center" Width="50px" />
<HeaderStyle Width="70px" CssClass="heading" />
<ItemTemplate>
<asp:CheckBox ID="chkAdd" runat="server" AutoPostBack=true OnCheckedChanged="chkAdd_Changed" CssClass="text"/>
</ItemTemplate>
</asp:TemplateField>
On Code Behind do this:
Protected Sub chkAllAdd_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkAllAdd.CheckedChanged
Dim gvRow As GridViewRow
For Each gvRow In GridViewForm.Rows
If gvRow.RowType = ListItemType.Item Or gvRow.RowType = ListItemType.AlternatingItem Then
If chkAllAdd.Checked = True Then
CType(gvRow.FindControl("chkAdd"), CheckBox).Checked = True
CType(gvRow.FindControl("chkView"), CheckBox).Checked = True
If chkAllModify.Checked = True And chkAllView.Checked = True And chkAllDelete.Checked = True Then
chkAllPermission.Checked = True
End If
Else
CType(gvRow.FindControl("chkAdd"), CheckBox).Checked = False
chkAllPermission.Checked = False
End If
End If
Next
If chkAllAdd.Checked = True Then
chkAllView.Checked = True
End If
End Sub
Hope this helps u???
|
|
|
|
|
Hi to All,
I display the data in DataGrid and I put bottom columns(Edit, Update, Cancel and Delete).
Now, I want using javascript To validate the user input. Like Numeric Only and when User click Update that time i want to confirmation.
Mkanchha
|
|
|
|
|
You need Javascript for time validation ie., while updating the record.
Regards,
Satips.
|
|
|
|
|
I would recommend converting your GridView columns to templates and then attach appropriate JScript handlers to input fields.
|
|
|
|
|
You might consider using Validation controls within templates to avoid messing with JScript.
|
|
|
|
|
Hi,
Can any one of you give me some online Sites/examples Developed in ASP.NET using Webparts and using catalog zones.
I am having some doubts in designing and coding catalog zones. I think some online live examples can help in understanding the scope of catalog zones.
Many Thanks,
Jagadeesh
|
|
|
|