|
Name "ClientScript" is not declared
|
|
|
|
|
It is SO disturbing to me the number of people here incapable of using a provided solution if one little step is assumed. Did you try to google the keywords in the reply you got, in order to find out where the ClientScript object exists ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yes I ClientScript.RegisterScript: I got five results, two were in chineese. I actually mis-understood by supervisor's clear as mud instructions and I no longer need to write javascript with ASP.NET
|
|
|
|
|
OK - a google lesson. Try ClientScript RegisterScript ( remove the . ) and you'll get tons of results.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
ClientScript.RegisterClientScriptBlock
-----
|
|
|
|
|
Jordanwb wrote: Name "ClientScript" is not declared
If you are using framework 2.0 or later, it's declared in the Page class.
As you didn't specify what you are using, it's usually assumed that you are using a reasonably recent version. If you for example is limited to use framework 1.1, you should specify that in your question.
In framework 1.1 you would use the Page.RegisterClientScriptBlock method instead.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hi All,
Is there a version of Microsoft.Web.UI.WebControls.dll for visual studio 2005. When I use it for v1.1 .net framework it works fine, but is not working on v2.
Thanks
Ben
|
|
|
|
|
are you talking about System.Web.UI.WebControls
-----
|
|
|
|
|
No, I am talking about the Microsoft.Web.UI.WebControls Assembly Reference.
I used to declare them as,
<%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
a few examples of them are:
TreeNode, TabStrip, Toolbar etc.
|
|
|
|
|
you can download it from here and then install it download
read more about it read more
-----
|
|
|
|
|
Thanks for that but it seems they work only under visual studio 2003.
I cannot get them on 2005.
regards
|
|
|
|
|
How can I return an array of strings from a web service?
I can return a string but returning an array doesn't work.
Thanks
|
|
|
|
|
dubbele onzin wrote: How can I return an array of strings from a web service?
Use the return keyword...
dubbele onzin wrote: I can return a string but returning an array doesn't work.
Yes, it does.
If you have any problem with it, what happens when you try? Do you get any error message?
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I need to test if the textbox was found in the gridview.
<code> txt1 = gv1.Rows(gv1.EditIndex).FindControl("TextBox1")</code>
this is how I'm searching for it how can I see if the control textbox1 was found or not?
thx
BiG RaLpH
|
|
|
|
|
FindControl will return a null reference if no control with the specified name was found.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I have a application which plots google map in that.. From the window where map is drawn, i have uses a javascript menu.
When a menu option is selected a new window is showed as model dialoge window.
When i run this web application for some time, the whole application gets stucks and i need to close the internet explorer window, otherwise it will be showing busy all the time.
can any one tell me why this happens??
thanks for the help in advance
Regards
Hari
|
|
|
|
|
Hi,
I am working on mobile applications but I am using the selection list inside the Mobile web user control and use the list to navigate between pages. for instance, my selection list will contain the number of pages and if I select one page my form has to get the second page results. I added a SelectIndexChanged event to navigate to other page but its not hitting the event at all. Could anyone please tell me. I am having the selectionlist in the code behind file of my user control.
the user control and the form that I insert my user control like this;
UserControl.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PagingMenu.ascx.cs" Inherits="PagingMenu" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<mobile:panel id="pageMenu" runat="server" paginate="True">
Code behind of user control
protected override void OnPreRender(EventArgs e)
{
RenderTheContent();
base.OnPreRender(e);
}
public void RenderTheContent()
{
int _noOfPages = 1;
for (int i = 0; i < Request.QueryString.Count; i++)
{
if (Request.QueryString.GetKey(i) != "pi" &&
Request.QueryString.GetKey(i) != "pfn" &&
Request.QueryString.GetKey(i) != "actn")
{
Query += "&" + Request.QueryString.GetKey(i) + "=" + Request.QueryString[i].ToString();
}
}
if (Query.Length > 0)
{
Query = Request.Url.LocalPath + "?" + Query.Substring(1);
}
else
{
Query = Request.Url.LocalPath + "?";
}
// Gets the values from Query String
if (Request.QueryString["pi"] != null && Request.QueryString["pi"].ToString().Length > 0)
{
PageIndex = Convert.ToInt32(Request.QueryString["pi"]);
}
// Calculating number of pages
if (Total % PageSize > 0)
{
_noOfPages = Convert.ToInt32(decimal.Floor(Convert.ToDecimal(Total) / Convert.ToDecimal(PageSize))) + 1;
}
else
{
_noOfPages = Convert.ToInt32(Convert.ToDecimal(Total) / Convert.ToDecimal(PageSize));
}
slist = new SelectionList();
slist.SelectType = ListSelectType.DropDown;
//slist.SelectedIndexChanged
MobileListItem li = null;
string valueString = "";
for (int i = 1; i <= _noOfPages; i++)
{
valueString = "";
li = new MobileListItem(i.ToString());
for (int j = 0; j < Request.QueryString.Count; j++)
{
if (Request.QueryString.GetKey(j) != "pi")
{
valueString += "&" + Request.QueryString.GetKey(j) + "=" + Request.QueryString[j].ToString();
}
}
valueString = "?pi=" + i.ToString() + valueString;
li.Value = valueString;
slist.Items.Add(li);
}
slist.SelectedIndex = PageIndex - 1;
pageMenu.Controls.AddAt(0,slist);
}
public void ChangePage(object sender, EventArgs e)
{
Query += "&pi=" + slist.Selection.Value;
RenderTheContent();
}
MyForm .aspx
<%@ Register src="PagingMenu.ascx" TagName="PagingMenu" TagPrefix="uc2" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<mobile:form runat="server" id="form">
<uc2:pagingmenu id="PagingMenu1" runat="server">
<mobile:objectlist id="rptPublications" runat="server">
<devicespecific id="dspChkAcct" runat="server">
<choice>
<itemtemplate>
<mobile:link id="aViewTopic" runat="server" font-size="Small" breakafter="True/">
<mobile:label id="tpcDetails1" runat="server" font-size="Small" breakafter="True">
<mobile:label id="tpcDetails2" runat="server" font-size="Small" breakafter="True">
<%--<separatortemplate> --%>
Thanks in advance,
Aruna.G
|
|
|
|
|
well from your code I couldn't understand where and how your are adding the event handler to the dropdownlist. You have to add the event handler to the dropdownlist, you can do it in multiple ways one of them is to do in the aspx page like
<asp:dropdownlist id="ddl" runat="server" onselectedindexchange="ChangePage"></asp:dropdownlist>
do this and see if it helps
-----
|
|
|
|
|
I have a simple web site written entirely using ASP.NET 2.0. I'm seeing some very weird URLS in my server logs. Here's an extract from today:
1 http://www.intonet-technology.co.uk/(X(1)S(j4kgykmhswm0hy45oo4yu5ni))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(np5ip2ffrq5zpa455wbgem45))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(pmpsrw45lxwqc5aa23mqy4np))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(gsqxw145kzj1c53nttxcap45))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(mlyu3sfl01dwbyegilpvsrz0))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(brkgw4y4dxr45h55urrdhx45))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(rds3dl552lngp4blc0xei245))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(gk4n3i55tsstta55aafcn2n3))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(ejn5mu45y4nsyzukabzn4orw))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(youl1fjghdcon355o0faji55))/Default.aspx
1 http://www.intonet-technology.co.uk/(X(1)S(klfvj555jytwl355yfedvc45))/Default.aspx
Can anyone explain what the (X(1)S(blahblahblah)) bit is all about?
- Tim Skipper
|
|
|
|
|
How come that almost every time someone post about something "very strange", it is not strange at all...
The site is using cookie-less sessions, which puts the session id in the url.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Thanks for the prompt answer! It's been infesting my Google listings which is the most annoying thing.
|
|
|
|
|
Hi,
I have a problem with me..If a user is timed out i mean session time out..user redirect to some page ssay, timeout.aspx page.....in my case once user came into this page user will click the browser back button and see the previous pages..i want to avoid that ie,,once user came into timeout.aspx page he can't see the previous pages....
Can anybody give a solution for that...it's very important for me...
Thanks & Regards
alex.
The code i am using is
window.setTimeout(\"window.location.replace('SessionTimedOut.aspx')\"," + (Session.Timeout * 60000) + ");
|
|
|
|
|
you can disbale the client-side caching using the following code
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi,
Thnaks for your reply....but i didn't get the result...please help me...
The code that you gave is put it in my timedout.aspx page...is that ok....
regards
alex.
|
|
|
|
|
You can put that in a common base class(if you have one in your application) which is inherited in all the page so that client-side caching will be disabled for the whole application. or you can put in the page that you don't want to cache on the client-side.
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|