|
i have to place this code at form load
and what's the meaning of
string attributeValue = "SomeJavaScriptFunctionCall()";
i think , a function which is defined in the master-page source file , i have to call that function ?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: a function which is defined in the master-page source file , i have to call that function ?
Yes
please don't forget to vote on the post that helped you.
|
|
|
|
|
string attributeKey = "onunload";
string attributeValue = "return abc();";
HtmlGenericControl body = (HtmlGenericControl)this.Master.FindControl("bid");
body.Attributes.Add(attributeKey, attributeValue);
this is th way i am writing the code.This is the aspx page , where on form load i am writing the code.this is a aspx page and have master page property.
the function is in the master page source file and has teh following definition
<script language="javascript" type="text/javascript">
function abc()
{
alert('hi');
}
</script>
this is not invoking any message
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
this.Master.FindControl("bid") {InnerText = '((System.Web.UI.HtmlControls.HtmlContainerControl)(((System.Web.UI.HtmlControls.HtmlGenericControl)(this.Master.FindControl("bid"))))).InnerText' threw an exception of type 'System.Web.HttpException'} System.Web.UI.Control {System.Web.UI.HtmlControls.HtmlGenericControl}
in add watch i got the detail , there i found this error .I think there is tying some mistake?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
I answered this yesterday. You couldn't work it out from the link I provided ?
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 )
|
|
|
|
|
the link which was forwarded to me yesterday, contains information about the unload functon in the aspx page(not having the master page property).My problem is , i am not being able to invoke the message box , on closing the web page (a page which is a aspx page and has master page propety).otherwise , the message bos is appearing on clicking the close button , in the case of a simple aspx page(not having master page property).
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia please tell me what you do for a living. Are you learning to be a programmer, or are you a programmer?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I am getting an error in the gridview when the user clicks paging in the gridview while edit process is not finished.I am using dataset and adapter to bind the gridview .
This is my error:
'System.Data.DataRowView' does not contain a property with the name 'version'.
God is always with you.
|
|
|
|
|
In your dataset ,version column does not exist.
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
No.No.
It is working fine when editing alone is done without clicking on paging in the half way of editing.
What r u trying to say?I can't understand.
Regards,
Saranya.
God is always with you.
|
|
|
|
|
Ok.
first get normal mode from editing mode on paging event then write code for paging and rebind gridview.
for example
on pageIndexChanged event
GridView1.EditIndex=-1
GridView1.PageIndex=e.CurrentPageIndex;
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Still it is not working.any solution else?
God is always with you.
|
|
|
|
|
Hi All,
In my asp.net 2005 application I tried to read and write to an html file. But I got the error message as follows.
Server Error in '/BW' Application.
--------------------------------------------------------------------------------
Access to the path 'c:\inetpub\wwwroot\BW\Msg.htm' is denied.
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.
I found the solution in google is that select the properties of the 'Msg.htm' and give permissions to the account ASP.NET from the security tab.
But when i selected the properties of that file, there is no security tab. Can you please tell me why it happened?
I am using Windows XP Professional version 2002 with the service pack 2
Thanks and regards,
Hogan
|
|
|
|
|
Open Explorer, go to "Tools" -> Folder Options. On the "View" tab scroll down in the list and uncheck the "Use simple file sharing (Recommended)" option.
The Security tab will now be available.
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
Hi Mircea,
Thanks for reply. I tried your solution. But still only "General" tab for the file properties.
Can you please help me?
Thanks and regards,
Hogan
|
|
|
|
|
Are you logged as an Administrator? You need to have admin privileges.
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
Yes I logged as computer adminstrator.
Thanks and regards,
Hogan
|
|
|
|
|
Is your C drive NTFS? It needs to be because permissions can only be set on NTFS volumes. If it is then you probably have some policies that prevent the display. Check to see if you have this registry key:
Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\windows\CurrentVersion\Policies\Explorer
Name: Nosecuritytab
Type: REG_DWORD
Value: 1
If you do then set the value to 0 or delete the key.
If you still have problems it might be that your computer is installed in a Workgroup. Check this kb article[^]
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
The registery seems ok. Thanks for that article. I will try that.
Thanks and regards,
Hogan
|
|
|
|
|
Hi,
I am getting this Error: 'theForm.__SCROLLPOSITIONX' is null or not an object. I'm not sure why it just started after the VS 2003 app got converted to 2005.
Anyways i have a asp:datagrid and i made the header column names link buttons so when i would click on them i could sort the datgrid by that column. But now when i click it just gives me that error in the lower left hand corner of the internet explorer page. (The bar at the bottom...im not sure what it's called)
well any help would be great.
|
|
|
|
|
Hi genious,
i had a scenario like this , i have 2 pages,
from page 1 i am opening page 2 with window.open in page 2 having yes button and 4 check boxes, iam getting this checkbox details when iam clicking yes with window.opener to page1.
when iam comming back to page 1 i need to execute code behind method based on checkboxes values.
i problem is how do call code behind method when iam on page1 with javascript or .net
thanks in Advance,
|
|
|
|
|
You could set the values of the checkboxes in a hidden filed in the parent window using window.parent . Then, assuming you have a button on page 1 you call window.parent.__doPostBack('ButtonName','') from page 2, and on the serverside in the click event of that button get the values of the hidden field using Request.Form('hiddenName')
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
Mircea Grelus wrote: get the values of the hidden field using Request.Form('hiddenName')
Everything looks OK Mircea, except this. ASP.NET has ServerSide HiddenField which can be accessed like hiddenName.Value in the CodeBehind.
|
|
|
|
|
Yes you're right. If you add the runat="server" property to the input field, it will make it a server control and you will be able to access it using it's name.
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
Hello !! Thank you for reading this post. Here is my problem. I have build a website that uses forms authentication.So there is a login page..you need to enter your login pwd and this is checked against a database and if authenticated is shown a welcome page. Also if i copy the url of a protected page, it will redirect to the login page and on successful login it will redirect to the requested page. All works fine.
Here is my problem
I need to integrate my site with the site of a vendor. My site shall be put inside an application folder under the vendor site. I cannot modify his web.config..i can add common classes and dlls though. I shall be giving the login component as a web user control to the vendor, this login is slightly different than my login page.On entering login and pwd, it checks against my db and if valid...it shows a welcome message inside the login control on a label and replaces the login/pwd boxes with a panel containing links to pages inside my app.On clicking on the links, it should redirect to my pages without a hitch. How will my forms authentication on my login page inside the vendor application directory know the user has been authenticated ? What stops it from showing the login page to the User? Please help !!! your comments are most appreciated !! a sample code or a link which can explain this wud be most appreciated !!
Thanks
RH
|
|
|
|