|
My reqirement is to capture the Master page event in The client page
In the click of Mater page button i have to control differnt client pages.
This click has different meaning at differnt pages
In the click of Master page button.
AT State page
It Should display all the state details
At city page
It Should display all the city details
how should i do?
Thanks in Advance
|
|
|
|
|
The question is a little unclear; however, if you have a buttons on the master page that are intended to open specific child pages I can't see what the problem is. Each button will have an event (which you need to hook up - open the page in design view and double-click on each button to create the event) that loads the specified page and then it is up to that page to carry out whatever tasks are required; e.g. State.aspx displays states and City.aspx displays cities.
If that is nothing like what you are asking then please ignore!
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
thanks for your promotional support.
Now i got some thing and done it for the same requirment is that
In master page i createed delegate and an event
Public Delegate Sub A(ByVal S As String)
Public Event C As A
Public Sub Search_Click(ByVal r As String)
RaiseEvent C(r)
End Sub
I've raised an event while at the button click of user control
Protected Sub btnGenerate_Click(ByVal sender As Object, ByVal e As System.EventArgs)
RaiseEvent C("txtToFind")
End Sub
In my client page i've handled the master page event with one method
AddHandler Master.C, AddressOf Me.Click
Public Sub Click(ByVal pSearch As String)
'code to execute
End Sub
but its not capturing the Click method.
|
|
|
|
|
Hello every1,
I am reading a book in order to build up my ASP.NET skills. I create a big project and then split it up into 3 category.
<br />
they way of split it.<br />
Add each of the three projects by right-clicking the solution name (i.e., Solution ‘SportsStore’) in<br />
Solution Explorer, and then choosing Add New Project.<br />
i have done some code in 1st project and in second project I need to add one of class's og 1st project.
I try to use using .... but I can't find the first project.
|
|
|
|
|
Hello,
You can add the dll of first project to the second project as a reference and then you can use using statement to use the methods of first project in second project.
Following is the procedure:
1. Select and Expand second project (say Project2)
2. Right click on References and choose "Add Reference"
3. Browse for the first project dll which would be in 'Bin\Debug\' folder of the first Project (Project1)
4. Select the dll and Click "OK".
5. Now you can use using statement in the second project to use the methods of Project1.
Let me know if I did not answer your question correctly.
Thank you,
Raheem MA
|
|
|
|
|
firstly,m thanks for your reply. your solution works very well but there is a problem.
In one of my project(SportsStore.Domain) I have created 3 folder, including different classes. after adding the dll in second project I type using statement. I just saw 2 folders and couldn't see all folders.
using SportsStore.Domain.Folder1
using SportsStore.Domain.Folder2
I can't see other folders and if I type it I will face with compiler error.
|
|
|
|
|
Referencing the DLL is not the best way forward, you're going to want a project level reference which is the far right tab on the add new reference dialog.
|
|
|
|
|
thx for your help guys. i solve the problem.
it wasn't public
|
|
|
|
|
I have two projects:
1) MyProject1
2) MyProject2
Directory Structure
MyProject1
-Images
---BaseControl
------img1.gif
------img2.gif
------img3.gif
-Css
---BaseControl
------StyleSheet.css
-Controls
---BaseControl.cs - derived from CompositeControl
---Derived1.cs - derived from BaseControl
---Derived11.cs - derived from BaseControl
---Derived12.cs - derived from BaseControl
MyProject2
-Controls
---Derived4.cs - derived from BaseControl
Assembly.cs for MyProject1
NOTE: Image is set as an embedded resource
[assembly: WebResource("MyProjects1.Images.BaseControl.gif", "img/gif")]
To get the link to the WebResource, I do the following:
<br />
myImgControl.ImageUrl = this.GetImageUrl("MyProject1.Images.BaseControl.gif");<br />
This works fine with Derived1, Derived11 and Derived12 controls since the embedded resource is available to their parent. However, Derived4 control cannot find the images because the 'MyProject1.Images.BaseControl.gif' is not part of its embedded resource.
Let me know if you need anymore info.
Thanks.
modified on Wednesday, August 11, 2010 6:43 PM
|
|
|
|
|
I am running windows server 2003 and sharepoint inside a virutal PC. I am able to access the Windows server and Sharepoint with no problem. However, how could i access the local websites/sharepoint over the internet.
e.g: I am able to access things running inside the virutal pc. But how could i access the virtual pc from it's parent machine or from the machine which is running the virtual PC
Thanks
|
|
|
|
|
hi
I'm using HttpContext cache for saving data for all application life time
the problem is that randomly the the cache is got empty
I founded that the user is in more than one appdomain during running
so maybe this is the reason that the cahce is suddenly empty and suddenly is not
but how I prevent it?
almog
|
|
|
|
|
In my experience I think that using the HttpContext cache to store data is not so smart; As The user progresses through your webapplication, The HttpContext changes everytime, because every response to the serve is a new HttpContext. so, eventually in time, the server will run it's garbagecollector through the 'old' data (which you want to use). So my suggestion is you create a public static class, which will hold all of your important variables. This way, your 'memory' will be this class that lasts the entire lifetime of the running thread. If you need any examples, please ask. I will be happy to help.
Hope this helps.
"My personality is not represented by my hometown."
|
|
|
|
|
why did i encountered this Error "Directory Listening denied" when i refer to spicial page in web?
what does it mean?
follow that message we see this:
This Virtual Directory does not allow contents to be listed.
modified on Thursday, August 12, 2010 2:54 AM
|
|
|
|
|
|
Avoid 'Repost' as well as 'Crosspost' from next time. It is considered rude.
Pick one forum based on the question and stick to it.
|
|
|
|
|
Hello Friends,
We have the following issue, please help us in getting rid of it.
Scenario:
We have an aspx page which contains two button controls. On click event of first button, generating excel sheet and prompting the user with the open/save dialog box.
Requirement:
Once the excel file generated and open/save dialog prompts to the user, the main window (which has two button controls) should be closed.
We are using the following code to return generated excel file:
Response.Clear();
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
string excelReportName = "MpmCostDataTemplate";
Response.AddHeader("Content-Disposition", "attachment; filename=" + excelReportName + ".xlsx");
..........................
and using the following statement to close the main aspx page window
Page.ClientScript.RegisterStartupScript(this.GetType(), "myCloseScript", "window.close();", true);
Issue is:
The above close statement is working fine if we remove the Response related code (that returns the excel file to the user). But its not working when we have Response related code in place.
Please let us know how can we get rid of this issue when we use Response kind of code.
Thank you,
Raheem MA
|
|
|
|
|
As you've found out you can't close the main window while the file is being streamed. You may be able to open a new window for the download then using window.opener close the main window.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thank you Mark for you response,
Is there any way to get the control back to the main window after the Excel file open/save pop up opens? Can't we access the controls after Response... related statements from code behind?
Please help us to get rid of this issue. And also it seems its an iteresting concept behind it. I want to know that clearly. It may help most of the developers. Please put the concept here to help most of our friends.
Thank you,
Raheem MA
|
|
|
|
|
It would be helpful if you read the response that was given, Window.Opener[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
try this:
Clicking on button will close window.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Button1.Attributes.Add("OnClick", "self.close()")
End Sub
OR
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Write(" { self.close() }")
End Sub
|
|
|
|
|
Hello Tanweer,
Thank you for your response,
If we use this it works fine. But on button click event Excel file will be generated and pops up the open/save dialog. After the open/save dialog pops up, the main window should close. If we do not have this code, the attribute works fine without any issues.
The main issue is when we have Response... related code we could not close the main window.
Can you please give some idea to get rid of this?
Thank you in advance,
Raheem MA
|
|
|
|
|
Hi All ,
I want to add calender scheduler to integrate with my asp.net application is there any free scheduler available that i can integrate. i tried goggle it but with out any success.
thanks,
amit
|
|
|
|
|
|
|
Hi,
I want to display show times and the list of movies under it.
The display would be like this -
Show Time 6.30 PM
Movie 1
Movie 2
Movie 3
Show Time 9.30 PM
Movie 1
Movie 2
Movie 3
I want to display it in such a way that when I Click on "Show Time 6.30 PM" it would display the movies under that show and wont display anything under
"Show Time 9.30 PM". Now when I click on "Show Time 9.30 PM", all the contents inside "Show Time 6.30 PM" should shrink and the list of movies should be available
in "Show Time 9.30 PM".
I need some idea on how to do this, will it be achieved using a sliding panel, or is there any other control.
Note - For the show times and movie details I have a collection which I am binding it to a repaeter control.
Regards
Vinay
|
|
|
|