|
ptvce wrote: when i debug it i show that the gridview.page count = 0 but i have 2 page
Where are you getting this error?
What about these Two :
OnPageIndexChanging="grdView_PageIndexChanging"
and
protected void grdView_PageIndexChanging(Object sender, GridViewPageEventArgs e)
{
grdView.PageIndex = e.NewPageIndex;
grdView.DataSource = bindgrid();
grdView.DataBind();
}
|
|
|
|
|
|
hello -
I want to display message once the user will click the back button from some browser. There should be buttons with ok and cancel, if the user select ok then he will be redirected to the previous page, if he clicks cancel then he will stay at the current page.
any help, advices...?
thanks ahead
|
|
|
|
|
|
we can do this.. Infact just now I saw the similar one in this forum only...
when I try to reply one of the post...
try by clicking the reply link and enter some text in the space provided and click back button...
you can see the effect which you are looking for...
Imtiaz A.K
|
|
|
|
|
You can attempt this in two ways
1) Disable the back button (plenty of examples for that) and handle the backward navigation from controls on your page.
2) Handle the onUnload event in JavaScript and determine if it came from the back button
only two letters away from being an asset
|
|
|
|
|
can you send me a link please from one of those plenty examples. I tried many of them, but nothing is really happening on that specific file, the back button is still enabled.
thanks, Laziale
|
|
|
|
|
|
Fact is, you cannot reliably turn off the back button. You're better off just fixing your code so that the back button doesn't do anything you don't want it to, such as log people back in.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
I have created a web service .I want to check either a directory exists or not on any other system.for this i have used Directory.Exists("\\ComputerName\SharedFolder").But it always return false.I have given everyone full control on this folder.Similarly on windows application and in web application it returns true but in web service it returns false.ANy body have idea to access network shared path in web services ASP.net2.0
Thanks
|
|
|
|
|
Try to use impersonate or create a different application pool for your web service with Identity of Local System .
|
|
|
|
|
Hello every one ,i have some images in to folder in solution explorer.Now how can i use the slide show control from sliding those.
|
|
|
|
|
|
|
Hello abhijit ,actually i have not got saticfy yet,no one answer was usefull to me ,and i need this ,hence i am asking this again.
|
|
|
|
|
hi in my aspx page, i am doing paging concept...,
i called the aspx page in inside the iframe tag page to avoid postback...,
i dont want to use updatepanel...,
help me in this issue
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
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..!
|
|
|
|