|
Just a guess, but maybe the server is down, host name has been changed, is being blocked, etc. What have you checked?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Tach experts ..
I have ne problem where I do not know to solve that...
I have a control that is added in a page. Basically it is a Content Management System.
It selects a new page and can add different controls.
In the control itself, I use a ModalPopupvon Ajax, but who needs a script manager.
Now I wonder whether in the side where the control is already added a ScriptManager exists otherwise I add one.
Here
void AddScriptMagnager()
{
ScriptManager _scriptMan = ScriptManager.GetCurrent(this.Page);
if (_scriptMan == null)
{
_scriptMan = new ScriptManager();
_scriptMan.EnablePartialRendering = true;
_scriptMan.EnableScriptLocalization = true;
if (this.MuMPage.Page.Form != null)
{
foreach (Control ctrl in this.MuMPage.Page.Form.Controls)
{
this.MuMPage.Page.Controls.Add(_scriptMan);
}
}
}
}
I always get the error that a Extendersteuerelemente may not be registered before PreRender.
I appreciate any help and thanks a lot in advance.
modified on Monday, June 21, 2010 9:02 AM
|
|
|
|
|
[CODE] There is a defined tag for this, <pre> implemented by clicking the "code block" toolbar item directly above this textarea. Please correct your post and read the posting guidelines for this site.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Add where are you calling the AddScriptManager method? Obviously no in the PreRender event handler.
The common implementation is to include a ScriptManger in the master page so it is not necessary to be included in child pages and is available for use.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
but what shall i do if there is none available in the master page?
|
|
|
|
|
You wrote the master page correct? Add a ScriptManager! If you did not write the master page then the author probably did not intend for Ajax to be used in this manner
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Nope, i c´ant! This is Standart site for everysite inour CMS.
I'm trying to do exactly that! Just when none is there in the page where I try to add the control at runtime and add a Script Manager.
And i get
Collection was modified; enumeration operation may not execute.
|
|
|
|
|
HELLO, I now have a template contains a script manager.
but I get this error message but still
Extender controls may not be registered after PreRender
|
|
|
|
|
HELLO, the error tells you what to do
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
but what is the right event to put into?
|
|
|
|
|
Can you do nothing on your own?
Go to the address bar of your browser and type, www.google.com, then click GO.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
is already done!
thxs for your helps.
modified on Tuesday, June 22, 2010 3:12 AM
|
|
|
|
|
Hi..
i just open new window using javascript.
Here Code below
function winopened() {
var docprint = window.open("AddCompany.aspx","child","toolbar=no,location=no,directories=no,menubar=yes,scrollbars=yes,width=1020, height=520");
return true;
}
so its working good if i click to button so new window pop up . its fine but when i try to close to that window direct to browser close button its wont be close i dont know wht the porb..
try and try untill reach success..
|
|
|
|
|
It is very hard to understand what you are trying to say.
To my understanding,
You want to close the Popup Window when the browser Close button is clicked right?
|
|
|
|
|
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 504
|
|
|
|
|
Check these[^].
If it doesn't help, follow steps below:
Can you access the server?
If No, can't help much.
If yes, check IIS logs file at: "C:\Windows\System32\LogFiles\W3SVC1\"
If there is more than one website hosted on your server, W3SVCNumber will differ.
Also check httperr Log file at: "C:\Windows\System32\LogFiles\".
Find related entries and give details.
..Go Green..
|
|
|
|
|
hi , iam using asp.net 2.0 with sql server 2000
in my site if iam using xp operating system all clients are able to upload the pictures but the clients those who are using windows7 and vista the are getting errors
can you correct my code
<%@ WebHandler Language="C#" Class="right7" %>
using System;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
public class right7 : IHttpHandler {
public void ProcessRequest (HttpContext context)
{
string branchid = "";
if (context.Request.QueryString["branchid"] != null)
branchid = context.Request.QueryString["branchid"];
else
throw new ArgumentException("No parameter specified");
context.Response.ContentType = "image/jpeg";
Stream strm = ShowImage(branchid);
byte[] buffer = new byte[4096];
int byteSeq = strm.Read(buffer, 0, 4096);
while (byteSeq > 0)
{
context.Response.OutputStream.Write(buffer, 0, byteSeq);
byteSeq = strm.Read(buffer, 0, 4096);
}
}
public Stream ShowImage(string branchid)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["transfer"].ConnectionString);
string sql = "SELECT imgright7 FROM tblImages WHERE BranchId = @BranchId";
SqlCommand cmd = new SqlCommand(sql, con);
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@BranchId", branchid);
con.Open();
object img = cmd.ExecuteScalar();
try
{
return new MemoryStream((byte[])img);
}
catch
{
return null;
}
finally
{
con.Close();
}
}
public bool IsReusable {
get {
return false;
}
}
}
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class right7image : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["transfer"].ConnectionString);
string branchid = "";
protected void Page_Load(object sender, EventArgs e)
{
branchid = Session["UserName"].ToString();
if (IsPostBack == false)
{
Image1.ImageUrl = "right7.ashx?BranchId=" + branchid;
Image2.ImageUrl = "right7old.ashx?BranchId=" + branchid;
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("Images.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlCommand cmdptr = new SqlCommand("copyprevimgr7", con);
cmdptr.CommandType = CommandType.StoredProcedure;
con.Open();
cmdptr.Parameters.AddWithValue("@BranchId", branchid);
cmdptr.ExecuteNonQuery();
con.Close();
SqlCommand cmdupdate = new SqlCommand("updateright7", con);
cmdupdate.CommandType = CommandType.StoredProcedure;
con.Open();
cmdupdate.Parameters.AddWithValue("@BranchId", branchid);
if (FileUpload1.HasFile)
{
FileInfo left1info = new FileInfo(FileUpload1.PostedFile.FileName.Trim());
byte[] left1content = new byte[left1info.Length];
FileStream left1stream = left1info.OpenRead();
left1stream.Read(left1content, 0, left1content.Length);
left1stream.Close();
cmdupdate.Parameters.AddWithValue("@imgright7", left1content);
}
cmdupdate.Parameters.AddWithValue("@noter7", TextBox1.Text);
if (cmdupdate.ExecuteNonQuery() != 0)
{
con.Close();
clsdatasettransfer.ShowAlertMessage("Updated.....");
TextBox1.Text = "";
System.Threading.Thread.Sleep(2000);
Image1.ImageUrl = "right7.ashx?BranchId=" + Session["UserName"].ToString();
Image2.ImageUrl = "right7old.ashx?BranchId=" + Session["UserName"].ToString();
}
else
{
clsdatasettransfer.ShowAlertMessage("Updatefailed");
}
}
}
|
|
|
|
|
developerit wrote: clients those who are using windows7 and vista the are getting errors
What error they are getting ?
|
|
|
|
|
|
|
Sandeep Mewara has posted an answer to your question "Popup menu and page redirection using javascript":
KishoreT wrote:
why the data passed along with the links is continuing for other address also, even if the page is not the same?
Though you have not posted the code that parses or forms the navigation URL, it is clear from your issue that you are not re-setting the querystring variable/parameter that to append to your base URL. You keep a URL to navigate and based on the add/edit/delete selection you go ahead and append that value to the base URL. while appending reset the query string parameter. Resetting would remove the old value.
hi sandeep,
sorry while writing the post i made that mistake.
the actual javascript is
window.location.pathname = Page1/Admin/xyz.aspx?action=edit
but in the address bar it was viewed after the page load is
href="http://SiteName/page1/Admin/xyz.aspx?action=add?action=edit
so I get an error that Request["action"] value at server side;
|
|
|
|
|
IIS Requires .Net Framework 3.5
Hi, I installed the VS2008 in my pc. When i open the Manage->IIS services. it doesn't show the 3.5 Framework in the Website's Properties here it show only 2.5 version.
I am using XP operating system. Please Let me know do i need to New version of IIS for 3.5 Framework.
|
|
|
|
|
Ravindra Bisen wrote: t doesn't show the 3.5 Framework in the Website's Properties here it show only 2.5 version.
It should be. There is only upgrades in dll for 3.5 Framework. So if you are getting 2.5.X.X . It's Fine.
just make sure, you IIS is properly registred with ASP.NET Framework. You can have look into aspnet_regiis command for the same.
Please let me know if you any doubts.
Thanks !
|
|
|
|
|
Explain about Boxing and unBoxing
|
|
|
|