|
Member 3879881 wrote: i called the aspx page in inside the iframe tag page to avoid postback...,
How you are avoiding Postback by using IFrame ?
Member 3879881 wrote: i dont want to use updatepanel...,
Why ?
Member 3879881 wrote: help me in this issue
What is your business requirment ?
|
|
|
|
|
I have a usercontrol which is to open a new window. This seems simple enough, but my code just does not work - clicking on the link button has no effect.
Here is my .ascx file:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TextContainer.ascx.cs" Inherits="SolutionsUI.Controls.TextContainer" %>
<asp:UpdatePanel runat="server" ChildrenAsTriggers="true" >
<ContentTemplate>
<div class="rbroundbox">
<div class="rbtop"><div>
</div></div>
<div class="rbcontent">
<asp:Label ID="lblContent" runat="server" Text="PlaceHolderText">
</asp:Label>
<div id="divEdit" runat="server" style="vertical-align:text-bottom; text-align:right;">
<asp:LinkButton ID="btnEdit" runat="server" Text="Edit" style="font" Font-Size="10pt" Font-Underline="True" Visible="true" ForeColor="White" OnClick="btnEdit_Click">
</asp:LinkButton>
</div>
</div><!-- /rbcontent -->
<div class="rbbot"><div></div></div>
</div><!-- /rbroundbox -->
</ContentTemplate>
</asp:UpdatePanel>
It is my understanding that you are not to use Response.Write for javascript when using Ajax. Instead, I register the script in my code behind function (which I have been able to step through).
protected void btnEdit_Click(object sender, EventArgs e)
{
Session["PageID"] = "1";
Session["PanelID"] = "1";
StringBuilder OpenScript = new StringBuilder();
OpenScript.Append("window.open('PopUpEdit.aspx");
OpenScript.Append("?pageid=");
OpenScript.Append(Session["PageID"]);
OpenScript.Append("'");
OpenScript.Append(",'Edit','width=400, height=450')");
OpenScript.Append("PopUpEdit.aspx");
OpenScript.Append("?pageid=");
OpenScript.Append(Session["PageID"]);
OpenScript.Append("'");
OpenScript.Append(",'Edit','width=400, height=450')");
string url;
url = OpenScript.ToString();
Page.ClientScript.RegisterStartupScript((this.GetType()), "OpenWin", "<script>openNewWin('" + url + "'</script>");
This did not work, nor did an alert:
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('" + "Test" + "');",true);
}
There is no javascript error or anything...it just does not launch the window. I see the following in the status bar:
javascript:__doPostBack('TextContainerIntro$btnEdit','')
Can anyone tell me how to do this?
|
|
|
|
|
Hello world!
Can’t anyone help me with this problem.
When the user click a button I store some information in to a session cookie on the server (hope that is the correct terminology) When the page reloads and I try and recover the information from the session state cookie it tells me that the object does not exist.
“Object reference not set to an instance of an object.”
Thanks for you help
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Web.Security;
using System.IO;
public partial class login : System.Web.UI.Page
{
public static clsGb_Cookie gb_cookies = new clsGb_Cookie();
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack == true)
{
Serializer ser = new Serializer();
gb_cookies = ser.DeserializeCookie(Session["MCE-QLS"].ToString());
// depending on the cookie settings ie user role set the screen access
}
}
public void btnLogin_Click(object sender, EventArgs e)
{
string strCon = ReadLocalConfigFile(); // Gets the DB connection string
// CheckLoginDetails will have updated memory object gb_cookies with either
// a valid users details OR "ERROR!" OR "USER NOT FOUND!"
clsCheckLoginDetails checkLoginDetails = new clsCheckLoginDetails();
checkLoginDetails.Validate(txbUserID.Text.ToString().Trim(),
txbPassword.Text.ToString().Trim(), strCon, gb_cookies);
// Save the result from the login attemp to the cookie
Serializer ser = new Serializer();
Session["MCE-QLS"] = ser.SerializeCookie(gb_cookies);
}
|
|
|
|
|
In which line you are getting the error ? Did you check the session value is null or not ?
|
|
|
|
|
Hi,
Thanks for taking a look....
The webpage runs-up fine.
and there is a string being passed to the
Session["MCE-QLS"] = ser.SerializeCookie(gb_cookies);
(if it is getting to the srever is another matter)
The problem occurs in the:-
if (IsPostBack == true)
{
Serializer ser = new Serializer();
gb_cookies = ser.DeserializeCookie(Session["MCE-QLS"].ToString());
// depending on the cookie settings ie user role set the screen access
}
what it says is that the Session object does not exist.
As for check if it is null, no, it should not be null as 1 second ago I wrote infomation to the session object. WHERE has my object gone, between page reloads/postbacks?
Is there a setting I need in the Web.config file?
Thanks
|
|
|
|
|
Since you are creating session in button click event...
and assigning cookie in the page load event ...
and your code
if (IsPostBack == true)
{
Serializer ser = new Serializer();
gb_cookies = ser.DeserializeCookie(Session["MCE-QLS"].ToString());
}
in the above code when you click button then the control first moves to form_load event, later it goes to the button click event ...
since in the form_load event session value is not yet set ...
thats why it is showing error message ....
correct me if not in same page as you...
Imtiaz A.K
|
|
|
|
|
Could not load file or assembly 'App_Code' or one of its dependencies. denyse access。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'App_Code' or one of its dependencies. denyse access。
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'App_Code' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
|
|
|
|
|
Hi all,
What is the purpose of twitter/facebook integration with our website.
What actually will happen when we integrate twitter/facebook in our website.
Could anybody also send me links where the integration have been done.
Thanks
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
rahul.net11 wrote: What is the purpose of twitter/facebook integration
Try to search in wikipedia
It is Community related websites which consists of followers/friends to make your application known to many people..!
|
|
|
|
|
Hi,
I know it is the social networking website but what is the use of integrating it with our web site.
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Not everyone integrates with facebook or twitter if there is requuirement then only they will integrate it ..!May be if you want to send sms to your followers then you will go for twitter..!
|
|
|
|
|
Link for facebook
this.lnkfacebook.NavigateUrl="http://www.facebook.com/submit?url=" + this.Request.Url;
|
|
|
|
|
HEllo every one, i got a slide show control in ajax tool kit.I have some pic in my image folder.How can i assign datasource of slide show control.tell me please.
|
|
|
|
|
Use Jquery Cyclic Plugin and bind it with ur images or from data base
|
|
|
|
|
hi sir,
can i change my crystal report connection string(ado.net) at run time from code behind.
if yes then how.please suggest
|
|
|
|
|
You Have Posted this question Many Times..!
If Any one Knows They Would Help You Before..!
Posting Many times will not Solve Your Problem..!
Every Time You are posting the same question means You are opening a new thread..!
|
|
|
|
|
Hi All friends..
I Have 2 tabels for categories and subcategories..
Which i have to show by Treeview control.. i have some restrictions that i cant use javascript.
And i have to use object datasource..
|
|
|
|
|
Sachin Dubey wrote: And i have to use object datasource..
So, what is the problem?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
what shuld be the process flo in this... i never used treeview with datasource
i only used with javascript..
|
|
|
|
|
Sachin Dubey wrote: Hi All friends..
I Have 2 tabels for categories and subcategories..
Which i have to show by Treeview control.. i have some restrictions that i cant use javascript.
And i have to use object datasource..
What is your question ? Do you want to bind the data from database into table or what ?
|
|
|
|
|
yes i want to bind data from db only but only using objectdatasource..
how can i handel the node click to show subcategories..
|
|
|
|
|
You can't use ObjectDataSource here. A tree view supports only data source that implements IHierarchicalDataSource .
|
|
|
|
|
Is It Any Control like object datasource or anything else...
|
|
|
|
|
Try This Link It MAy Help..!
[^]
|
|
|
|
|
Get the result set in a Collection Object and loop through it.
1) First, get the dataset in Businesslayerclass as below:(eg:businessclass name is Employee)
public static Collection <Employee>GetData()
{
Collection<EmployeeData>empcollection = new Collection<EmployeeData>();
foreach (DataRow datarow in dataset1.Table[0].Rows)
{
}
}
2) In UI, call this method as below:
Employee emp = new Employee();
Collection<Employee>empcollection = new Collection<Employee>();
foreach (Employee emp1 in empcollection)
{
TreeNode tn = new TreeNode(emp1.Name)
tn.OnPopulateDemand = true;
TreeView1.Nodes.Add(tn);
}
Hope this helps.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|