|
rahul.net11 wrote: Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (E:\web.config line 53)
Error message is clear, isn't it? Server don't have AJAX server extensions installed.
|
|
|
|
|
Hi Navaneeth,
To solve the error should i have installed Ajax server extension on my server. I have copied all the dll (like Ajax toolkit.dll) on my server. Is it necessary to install Ajax extension?
Thanks
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Yes it is necessary to install AJAX extensions.
|
|
|
|
|
Ajax should be installed by the person who is maintaining the server. contact contact ftp provider and ask them to install ajex. then it will work.
|
|
|
|
|
jegastar wrote: Ajax should be installed by the person
You mean AJAX extensions, right? AJAX and AJAX server extensions are different.
|
|
|
|
|
Hi,
How can we communicate with linux server from .net application? I need to upload/download files to linux server using .net desktop/web application preferably using sftp.
-Thanks,
Priya.
|
|
|
|
|
Hi friends,
I am using Asp.Net application. From my codebehind i call the javascript function. so i am using,
Page.ClientScript.RegisterStartupScript(Me.GetType(), "onLoad", "showcontent()", True)
Now i registered script.Now i call the function showcontent in my contentpage.
//window.onLoad=showcontent();
function showcontent()
{
alert("enter");
}
while my contentpage load, this script fire and give alert message.But it doesn't fire.It gives script error. ie
"missing ;before statement.[Break on this error] showcontent()Sys.Application.initialize();\n
This error is happened in firefox. Run in IE nothing happened. The script is not fired in IE. what is the problem? I cant find it.
Please help me if u can.
Hope ur's reply
Thanks
<div class="ForumSig">Every Successful Person Have A Painful Story</div>
|
|
|
|
|
Seems like you are trying to Register your Client Script in a page where AJAX is enabled. You cannot Call ClientScript.Register.... and Response.Write when PartialRendering is True (i.e in the AJAX page).
|
|
|
|
|
Hi dude
I got it. Register the script is problem. Now it's working.
Thanks
Every Successful Person Have A Painful Story
|
|
|
|
|
Hi All,
Im triyng to use the System.Timers.Timer control in my page. In de button click eventhandler i have this code:
System.Timers.Timer myTimer = new System.Timers.Timer();
myTimer.Interval = 1000;
myTimer.Elapsed += new System.Timers.ElapsedEventHandler(myTimer_Elapsed);
myTimer.Enabled = true;
protected void myTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
//do test
Label1.Text = "a";
}
The problem is that nothing happens ofter clicking the button.
What is wrong here?
Thanks.
|
|
|
|
|
NewToAspDotNet wrote: What is wrong here?
You don't understand how web applications work. There is no state. They are stateless. The page exists only for the briefest moment while the request is handled. After that it is unloaded from memory. Your timer now has nothing to time.
|
|
|
|
|
|
If you wanna use timers, take a look at the AjaxControlToolKit
The have a timercontrol that behaves just like the timer in windows apps
Alexei Rodriguez
|
|
|
|
|
i have a page in which i have property name
public partial class mypage : System.Web.UI.Page
{
private Class1 mclas;
public Class1 Mclas
{
get { return mclas; }
set { mclas = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Mclas = new Class1();
}
}
}
In a user control i want to access this property Mclas
mypage mpage= this.Page;// this doesnt work the it gives compile error the type or namespace mypage couldnot be found
mpage.Mclas
|
|
|
|
|
Try this:
Object X = this.page
Object Variable = X.PropertyName
This will only work if the page containing this control has a property with the name of PropertyName
Look at this VB example:
Inside Control:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim P As Object = Me.Page
Response.Write(P.X())
End Sub
Inside Page
Public ReadOnly Property X()
Get
Return "Something"
End Get
End Property
Alexei Rodriguez
|
|
|
|
|
Create an interface that contains only the properties that you wish to access. Then you have the Page class implement that interface.
Now you can cast the controls' this.Page to the interface, and access you property through it.
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn. What you don't know. We teach
|
|
|
|
|
Hi,
I have populated a few dropdown boxes in runtime and these boxes are bind to a objectdatasource. When I click the Formview's insert button, it posts back to server, and all the items inside the dropdownboxes are disappearing.
How could I protect the values of these boxes in runtime even post back occurs. I tried to define a conditional statement to control to post back as (if not page.ispostback Then), it didn't work out too. All I need is to have the values for the dropdownboxes regardless of if postback occurs or not.
If you know the answer, would you please let me know.
Thank You.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Doesn't ViewState preserve it automatically?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
Thanks for responding. The formview's viewstate is already enabled. I am still looking for a solution.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Vasudevan Deepak Kumar wrote: Doesn't ViewState preserve it automatically?
NO. If OP is creating the control in any event after viewstate is loaded, it's viewstate won't be preserved.
|
|
|
|
|
Web applications are stateless. When you create dynamic controls, ASP.NET won't be able to maintain it's viewstate. Dynamic controls has to be recreated each time page posts. Use OnInit or any event which fires before viewstate is saved to create your dynamic controls.
|
|
|
|
|
Thanks for responding. I never thought that it would be such painfull to deal dynamic controls in asp.net. I placed this dropdownboxes inside the formview and I have populated them in runtime and they are bind to objectdatasource.
The values returns nothing when I try to populate them in Page_Init event. It can't find the control (Formview1.FindControl("GetYear")) returns nothing. OnInit requires an event argument. How coudl you define an event for OnInit inside an aspx page. Would you give me an example.
Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Hi all, I have a little problem I have a gridview with paging and sorting, all work well except when I change the page then the gridview lost the sorting and it put again by default sorting.
Any idea how maintein the sorting when I change of page?
I send you my code, thanks for all.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
If Not Page.IsPostBack Then
EnlazarDataGrid()
gridView.Columns(0).SortExpression = True
End If
Catch ex As Exception
End Try
End Sub
Private Property GridViewSortDirection() As String
Get
Return IIf(ViewState("SortDirection") = Nothing, "ASC", ViewState("SortDirection"))
End Get
Set(ByVal value As String)
ViewState("SortDirection") = value
End Set
End Property
Private Property GridViewSortExpression() As String
Get
Return IIf(ViewState("SortExpression") = Nothing, String.Empty, ViewState("SortExpression"))
End Get
Set(ByVal value As String)
ViewState("SortExpression") = value
End Set
End Property
Private Function GetSortDirection() As String
Select Case GridViewSortDirection
Case "ASC"
GridViewSortDirection = "DESC"
Case "DESC"
GridViewSortDirection = "ASC"
End Select
Return GridViewSortDirection
End Function
Protected Function SortDataTable(ByVal pdataTable As DataTable, ByVal isPageIndexChanging As Boolean) As DataView
If Not pdataTable Is Nothing Then
Dim pdataView As New DataView(pdataTable)
If GridViewSortExpression <> String.Empty Then
If isPageIndexChanging Then
pdataView.Sort = String.Format("{0} {1}", GridViewSortExpression, GridViewSortDirection)
Else
pdataView.Sort = String.Format("{0} {1}", GridViewSortExpression, GetSortDirection())
End If
End If
Return pdataView
Else
Return New DataView()
End If
End Function
Protected Sub gridView_Sorting(ByVal sender As Object, ByVal e As GridViewSortEventArgs)
Try
gridView.Columns(0).Visible = True
Dim Comunidad As Integer
ViewState("Comunidad") = Util.Usuario.IdComunidad
If Util.Usuario.AdminUser = 1 Then
Comunidad = ViewState("Comunidad")
Else
Comunidad = Util.Usuario.IdComunidad
End If
Dim Propietario1 As DataTable = Propietarios.ObtenerPropietarios(Comunidad)
gridView.DataSource = Propietario1
GridViewSortExpression = e.SortExpression
Dim pageIndex As Integer = gridView.PageIndex
gridView.DataSource = SortDataTable(CType(gridView.DataSource, DataTable), False)
gridView.DataBind()
gridView.PageIndex = pageIndex
gridView.Columns(0).Visible = False
Catch ex As Exception
End Try
End Sub
Protected Sub gridView_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gridView.PageIndexChanging
Try
gridView.Columns(0).Visible = True
gridView.PageIndex = e.NewPageIndex
EnlazarDataGrid()
gridView.Columns(0).Visible = False
Catch ex As Exception
End Try
End Sub
|
|
|
|
|
Hello!
I have seen this problem before and i have not found any better solution than to save the sortexpression value in a session variable.
Every time the sortexpression is not null, save it to the session, and use the session when the sortexpression is null.
somewhere i saw that this is a bug in the gridview that is exposed when you are databinding from codebehind, but it could be a rumor.
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn. What you don't know. We teach
|
|
|
|
|
Dreamweaver is the web development tool i use, so I guess I should be using php. But from what I heard php and asp.net are similar. I'm more comfortable with the .net suite and I was wondering because of that, should I start doing dhtml in there, or keep with dreamweaver. I mean php can't be that hard, just which one is better overall?
|
|
|
|