|
Hi u can remove ur master page ok no problem .. what u do means ,
1.remove ur masterpage reference from ur <@ page > page directive
2. add ur user control what u mentioned in master page that user control
3.add ur HTML guide reference
4.add ur html tags like hetml,head,title,and if u r using any any some script funtion..
thats all..
incase u cant do it send ur .aspx page and ur masterpage to my id.
n.nanthakumar@gmail.com
Reg
nantha
|
|
|
|
|
I think he wants to remove dynamically from Code.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
I don't think you can remove the master page but you can change the master page. So, you can two master pages in your website. Change it at Page_PreInit event.
Eg:
protected void Page_PreInit(object sender, EventArgs e)<br />
{<br />
this.MasterPageFile = "MasterPage2.master";<br />
<br />
}
Edit: I didn't see Steve's reply. I think his reply is the answer.. I forget to click "Submit" button before going lunch.
-- modified at 2:07 Thursday 16th August, 2007
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Before designing a web application using Master pages try to have two master page files:
1) Master page with Header.
2) Master page without Header.
Whenever you dont require the header part do the following code
protected void Page_PreInit(object sender, EventArgs e)
{
this.MasterPageFile = "MasterWOHeader.master";
}
The Idea behind this is, normally we use to include the common javascript functions in the master page since its a generic container. If you remove the masterpage then it might give you some problem[Since masterpage holds the generic javascript code], its better to embed the common javascript files in both the masterpages and use it in the required scenario.
Thanks,
Ganesh Kumar
|
|
|
|
|
Hi,
I'm hoping I've just overlooked something obvious here and someone will be able to help, one of those things where it's pretty simple and *should* work but doesn't...
I originally had this code on a page, which worked fine:
<div id="remote-support">
<h2>Remote Support</h2>
Pin code:
<asp:TextBox Width=80px ID="TextBox1" runat="server"></asp:TextBox>
<br /><br />
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
I replaced it with the following code on the page:
<div id="remote-support">
<% Response.Output.Write(Common.RemoteSupport(ThisPage))%>
</div>
And this is in some shared code in App_Code:
Public Shared Function RemoteSupport(ByVal ReferringPage As String) As String
RemoteSupport = "<h2>Remote Support</h2>" _
& "Pin code: <asp:TextBox Width=80px ID=""TextBox1"" runat=""server""></asp:TextBox><br />" _
& "<br />" _
& "<asp:Button ID=""Button1"" runat=""server"" Text=""Button"" />"
End Function
Now, what's happening is there's no controls appearing on the page, despite the page source containing the control tags as normal.
Suspect this has something to do with me getting something fundamental wrong, but can't quite get my head round what's going on. Surely it's possible to do this one way or another, maybe just not this way...
Any help would be greatly appreciated
Thanks
Chris
|
|
|
|
|
RemoteSupport = "<h2>Remote Support</h2>" _
& "Pin code: <asp:TextBox Width=80px ID=""TextBox1"" runat=""server""></asp:TextBox><br />" _
& "<br />" _
& "<asp:Button ID=""Button1"" runat=""server"" Text=""Button"" />"
You can't do like that since asp:TextBox and asp:Button are Server-side control. The way how server-side controls work is that Web Server will generate the HTML controls and send them to the browser. So, you may write HTML control like that.. then it will work..
"<h2>Remote Support</h2>" _
& "Pin code: <input type=""text"" Width=80px ID=\"TextBox1\" /><br />" _
& "<br />" _
& "<input type=""button"" value=""value"" />"
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Awesome, that will work.
Thanks for your help
|
|
|
|
|
Hello,
VS 2005
I have created an web service project and added a MSI setup project.
I added my own custom action which is a windows exe that will allow the user to select their own virtual directory for installing the web service. This worked ok.
I remove the default installation dialog from the user interface, and have the windows exe in its place.
However, as the project installs it always installs in the default C:\intput\wwwroot\websetup1 directory.
The way my custom action works is that it will create a new virtual directory then move all the files from the default directory "C:\intpub\wwwroot\websetup1". to what the user has specified. However, this mean that the default directory still exists. So the last thing that the custom action will do is delete this directory. However, as the custom action DLL has been installed in this directory I am unable to delete it "Access Denied"
So the possible solution that I have, is it possible to stop the setup installing in the default directory and install in the user specified directory instead of copying the directory across?
Many thanks for your suggestions,
Steve
|
|
|
|
|
1/ i want to display a youtube video or other content on a specific part of the page,and when its finished, display content from another source on the same place. im not sure how and in what control i should display the contect so i can get this ability. for example, if it was only text, i would do it with a label, changing its "text" property. i need the same ability but with other types of contents, primevally <object> and <embed /> content. do i need an update panel or the content source be changed with client side javascript only ?
2/ whats the process for creating "widgets" ? in widgets i mean all those objects like youtube videos, meebo and other that can be published on webpages only by adding an "<object>" tag to the page ? articles or tutorials ?
3/ whats the keyword "Or" is doing in vb.net ? what that line means ? "x Or y Or z" in vb.net ? how do i translated it to c# ?
4/ how do i plant a vb.net code in the middle of c# code in a .cs file ? is it possible ? i think i saw somthing about it..
thats it, i hope its not to much and all the questions are clear..
-- modified at 13:42 Wednesday 15th August, 2007
|
|
|
|
|
1. <asp:placeholder runat="server" id="phSomething">
content goes here
in the codebhind we set the visibility
CODEBEHIND:
if contained within a repeater or someother control: Page.FindControl("phSomething");
otherwise just:
protected void Page_Load(object sender, EventArgs e)
{
phSomething.Visible = true;
}
protected void On_Some_Event(object sender, EventArgs e)
{
phSomething.Visible = false;
}
Something to remember, the PlaceHolder control does not remember the contents of it between postbacks. So if it is needed to retain information across post backs, you can set all data to a session variable or cookie, or host the placeholder inside an AJAX Update panel and post back Asynchrously.
2. This isn't ASP.NET particularly... However you can set the "MinMaxClose" toolbar to not visible and that should help make it more difficult. I'm not a WinForms expert
3. The process of widgets in ASP.NET (this is an ASP.NET forum) is more or less using XML web services to pass data or "consume" a webservice. I dont exactly know what all you mean here, the <object> tag dates back to HTML 3.0 or even earlier... It's more or less a Web Standard nowadays.
4. OR is a keyword that is used in conditional statements.
Let's say that we want to make an if statement:
If(Algoaddict_Posts_ASPNET_Forums OR Algoaddict_Posts_Anywhere_Forums)
Algoaddict_Answered = true
EndIf
In C#:
if(Algoaddict_Posts_ASPNET_Forums | Algoaddict_Posts_ASPNET_Forums)
{
Algoaddict_Answered = true;
}
In this case, OR returns a boolean true if either case returns true. Thus, you were answered. For more information, you can see MSDN Documentation on CONDITIONAL STATEMENTS and BOOLEAN OPERATORS.
--EDIT
Darn! You modified the questions!
4. Not really possible, no. However, you can create a vb class and call that class from inside a CS file.
|
|
|
|
|
thanx a lot !
1/ what happens if i want to set the content of the window in run time ? i cant use the approach of creating all the windows and only hiding and displaying them as you suggested. an i frame would do the work, is it still being used in asp.net 2.0 after ajax arrived with all its features ? or theres an ajax replacement ? cant this be achived with updatepanel ?
4/ about the Or - i know the original usage of it and how it can be converted to c# but in this specific case, visual studio says its an integer, and its not between boolean variant - this is the exact code:
"SetWindowLong(Me.Handle, GWL.ExStyle, m_InitialStyle Or WS_EX.Layered Or WS_EX.Transparent)"
when the last parameter should be of type "Window_Library.WindowLibrary.User32Wrappers.WS_EX()"
furthermore, i tried copying the exact code and replace "Or"s with "|" and get the following error message:
Error 1 Operator '|' cannot be applied to operands of type 'int' and 'Window_Library.WindowLibrary.User32Wrappers.WS_EX'
thanx again
|
|
|
|
|
I latebind my content all the time. That's an easy one.
protected void OnDataBind_Control_to_Show(object sender, EventArgs e)
{
SetCorrectView();
}
protected void SetCorrectView()
{
Series of if statements that check for control.txt or control.value = "" or null
}
If the control has data, show it. otherwise dont. Easy peasy.
In that case, I can see howit's being used, and the reason VS shows it as an integer, is that all three possible arguments sent to the function must be integers. So, in your case, the last argument can take any of those three specific arguments, but they must all be ints.
|
|
|
|
|
i downloaded this:
http://www.codeproject.com/csharp/winformiehost.asp
and its working on my vista home basic, but not on xp sp2. the build runs ok in visual studio but the app crashes with this errro message:
System.Security.SecurityException was unhandled
Message="Request failed."
Source="SampleEventProgram"
StackTrace:
at SampleEventProgram.Form1..ctor()
at SampleEventProgram.Form1.Main()
does anyone have a clue ?
i worked a whole day making this work in c# (i managed doing it using csharper conversion) but it doesnt work on xp wich is much more important for me...
this is the error code windows is giving
EventType : clr20r3 P1 : sampleeventprogram.exe P2 : 1.0.2784.1621
P3 : 46c3840a P4 : sampleeventprogram P5 : 1.0.2784.1621
P6 : 46c3840a P7 : 8 P8 : 0 P9 : system.security.security
thanx again
-- modified at 18:55 Wednesday 15th August, 2007
|
|
|
|
|
Hi,
I am using VB.NET 1.1. I have an QuickSearch.aspx page, and I have I reference to a web user control like:
<%@ Register tagprefix="MyTagPrefix" tagname="MyHeader" src="Header.ascx"%>
Inside Header.ascx there is another control called QuickSearch.ascx, and there is a textbox that I need to get values from so tha I can display the results in QuickSearch.aspx.
How do I do this?
Please can some one help?
Regards,
.NET Coder
|
|
|
|
|
dim txt as Texbox = Ctype(TextBox, Header.FindControl("txtID"))
Or something like that in vb.net. C# is
TextBox txt = (TextBox)Header.FindControl("txtID");
I didn't get any requirements for the signature
|
|
|
|
|
Hey guys, I'm having a small problem with a scalar variable. I took the code from another project I wrote but there were a few changes in this new project so I wasn't able to do the same thing as last time. Anyway, now I'm getting the error "Must declare the scalar variable "@State".", mostly because I'm not exatly sure where to declare it.
The code is a bit scattered, but I'll try to make it as short as I can, without leaving anything out. Although I think the problem is in the SqlDataSource with the select prameters / control parameter
EDIT: In hindsight I really should have specified what I'm trying to do. There is a drop down list where users will pick a state of a variable from a database, then the infomation matching that state will be displayed accordingly.
Drop Down List:
<asp:DropDownList ID="DropDownList1"
runat="server"
DataSourceID="myFilteringDataSource"
DataValueField = "State"
AutoPostBack = "True">
</asp:DropDownList>
The SqlDataSource:
<asp:SqlDataSource ID="myFilteringDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT State FROM tblTicket" >
<SelectParameters>
<asp:ControlParameter Name="State" ControlID="myDropDownList" PropertyName="SelectedValue" />
</SelectParameters>
</asp:SqlDataSource>
The VB/SQL code which would interact with the "@State":
Dim cmd As New SqlCommand("SELECT * FROM tblTicket ... WHERE ... tblTicket.State = @State", New SqlConnection(strCon))
cmd.Connection.Open()
Dim myReader As SqlDataReader = cmd.ExecuteReader()
The actual error I was talking about ("Must declare the scalar variable "@State".") comes up at 'Dim myReader As SqlDataReader = cmd.ExecuteReader()', so I pretty much know that I just have the variable delared in the wrong place.
I'd really appreciate any help, and if any more code is needed I'll post it right away.
Thanks,
aqzman
|
|
|
|
|
Most of your markup is not visible. Use the "Ignore HTML" option when you are posting markup code.
You have to add a parameter to the command object. The parameter that you have added to the SqlDataSource isn't used, as you don't use the SqlDataSource.
---
single minded; short sighted; long gone;
|
|
|
|
|
Oh, thanks for letting me know about that. I really should have looked over my message once it was posted.
I'm not exatly sure what you mean by it isn't used, the SqlDataSource is called in DataSourceID of the dropdownlist. Or maybe I've misunderstood you.
Thanks for the help!
aqzman
|
|
|
|
|
aqzman_ wrote: I'm not exatly sure what you mean by it isn't used, the SqlDataSource is called in DataSourceID of the dropdownlist. Or maybe I've misunderstood you.
The SqlDataSource is used on the page, but it's not used in the code that you have problems with.
---
single minded; short sighted; long gone;
|
|
|
|
|
hi dear friend's
how can i change the type property of a textbox from 'text' to 'password' with javascript??
thank you
msma
|
|
|
|
|
|
thank you but i need a code to change the type property of a textbox(html element) from 'text' to 'password'
msma
|
|
|
|
|
mr.mohsen wrote: how can i change the type property of a textbox from 'text' to 'password' with javascript??
You can't. Once the type has been set for an input element, it can't be changed. You have to create a new element.
---
single minded; short sighted; long gone;
|
|
|
|
|
Yeah one option would be to have two textboxes on the page. Then change the Style.Display property to show one or the other which can be done easily with Javascript.
I didn't get any requirements for the signature
|
|
|
|
|
hi dear friend's
oh my god
im alone and alone
and nobody close me
no body know me
nobosy love me
nobody like me
but i have u
you like me
u love me
u power me
and u are all of my things...
thank u
|
|
|
|