|
|
Simply place a content place holder in the head section of your master page. Then on your child pages go to design view and select header placeholder and choose custom contents and then provide your child related meta tags in there.
I Web Development Free Lancer
Share your experience with others
Check my Blog...
|
|
|
|
|
If I am going to use the AdRotator with Database and set the properties from the table fields, how can I set the impression?
|
|
|
|
|
You could have THIS[^] link to be useful.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
but that doesn't answer the question how to calculate.. it just says the impression is missing when using database? but is it actually calculated?
|
|
|
|
|
I am using this to display CollapsiblePanelExtender but it's not working ad I dont know why? there is no error and it workes when i set the Collapsed to True or False but not working when I run and want the user to click ro Collapsed or Expand?
<asp:CollapsiblePanelExtender ID="collapsibleSkills" runat="server" Collapsed="False" TargetControlID="panelSkills" CollapseControlID="lblSkills" ExpandControlID="lblSkills" CollapsedText="[+] Skills :" ExpandedText="[-] Skills :" TextLabelID="lblSkills" />
<br /><dxe:ASPxLabel ID="lblSkills" runat="server" Text="Skills :" Font-Bold="true" Font-Size="Large" /><br />
<asp:Panel ID="panelSkills" runat="server">
<ul id="Ul1" runat="server">
<li>Project Management using different project management software.</li>
<li>ITIL v3 Foundation.</li>
</ul>
<hr />
</asp:Panel>
</pre>
|
|
|
|
|
This control inserts JavaScript into your page for the functionality. Have you debugged it?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I want to know how can I build a search engine to search and show result from specific websites. for example, a search engine which search codeplex and msdn only?
|
|
|
|
|
|
HI TO ALL
ANY ONE CAN TELL HOW TO WORK WITH RSS FEED AND WHY U USE AND WHERE?
rizvan sivally
|
|
|
|
|
Stop shouting and use Google.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You can get some know how of RSS by doing some Googling. For example try Wikipedia to get an idea of RSS. In ASP.NET 4.0 there is built in support for doing RSS syndication. Use MSDN to find code samples to generate and read RSS.
I Web Development Free Lancer
Share your experience with others
Check my Blog...
|
|
|
|
|
hi
how to open page2 from page1 by press button1 on my asp.net program ?
i work on C# visual-studio-2008
thank's in advance
|
|
|
|
|
Gali1978 wrote: open page2 from page1 by press button1
1. Use JavaScript PopUp by using window.open . Have a look here http://www.blazonry.com/javascript/windows.php
2. Use Response.Redirect("page2.aspx") in page1 -- > button1 click event.
|
|
|
|
|
hi,
i have one label out of update panel and one button inside update panel. in button click event i update the label text. when i run the code and click on button then partial postback occur and button click event fire but label value is not change. if i put the label too in the update panel then label value change at the time of button click. i do not understand why label value is not getting updated. suppose if i want that label should stay out of update panel and label value should change at the time of partial postback then how to write the code. i dont want put the label in any update panel. please guide me with small sample working code.
thanks
tbhattacharjee
|
|
|
|
|
|
thanks for ur help....i understand the flow.
tbhattacharjee
|
|
|
|
|
|
i got a sample code from a site. onething i just do not understand regarding how value is added in viewstate automatically.
private Dictionary<Guid, string> Names
{
get { return (Dictionary<Guid, string>)ViewState["Names"]; }
set
{
ViewState["Names"] = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
var names = new Dictionary<Guid, string>
{
{Guid.NewGuid(), "John"},
{Guid.NewGuid(), "Smith"},
{Guid.NewGuid(), "Arther"},
{Guid.NewGuid(), "Hari"}
};
ViewState.Add("Names", names);
}
}
protected void btnAddSave_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
Names.Add(Guid.NewGuid(), txtNewName.Text);
}
}
in page load event i understand that few values has been added in Dictionary collection and after that the whole collection is added in viewstate named "Names".in btnAddSave_Click event the code Names.Add(Guid.NewGuid(), txtNewName.Text); adds name again in collection. but one things i just do not understand that how new value is added in viewstate. if someone look private Dictionary Names property there is no any setter so how automatically new value is added in viewstate. i hope my question is clear. in simple word i just want to know there no any setter but then how new values has been added in viewstate when the code goes like "Names.Add(Guid.NewGuid(), txtNewName.Text);". automatically how new values has been added in viewstate. because new values is added in dictionary collection but there is no code available where all dictionaly values added in viewstate after adding any value to the dictionary collection.i run the code and it works fine.so this code become very ambiguous for me. so please help me to understand how new values is added in viewstate when any new values is added in dictionary collection. thanks
tbhattacharjee
|
|
|
|
|
The sample isn't very successful as a basic explanation of accessing viewstate through a method. This is because it adds a dictionary to ViewState, making the code more complicated to understand, as the viewstate iteslf is a a dictionary so you have to workout whether you are dealing with the Viewstate dictionary, or the dictionary inside it. Adding a dictionary to viewstate *is* a pukka thing to do, but it also confuses the explanation IMO. Worse the code adds a new GUID as the key,but doesn't store it on the server side, so it is effectively useless as a key . Take this simplified code, which just stores an integer:
const string MyKey="MeaningOfLife"
private int MeaningOfLife
{
get { return (int)ViewState[MyKey]; }
set { ViewState[MyKey] = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
ViewState.Add("Names", names);
}
protected void btnFoo_Click(object sender, EventArgs e)
{
if (Page.IsValid)
Label1.Text= MeaningOfLife;
}
You only need to add the value once (here before postback): it is available in subsequent postbacks as it is in the viewstate object. The property really just wrappers up accessing the Viewstate dictionary key a bit more neatly than direct access. In your sample code Names.Add(Guid.NewGuid(), txtNewName.Text); the Names property gets the Dictionary added in the page load event, the Add method is called on it to store the new value in the Dictionary inside the [viewstate] Dictionary.
|
|
|
|
|
u have given code like this
const string MyKey="MeaningOfLife"
private int MeaningOfLife
{
get { return (int)ViewState[MyKey]; }
set { ViewState[MyKey] = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
ViewState.Add("Names", names);
}
protected void btnFoo_Click(object sender, EventArgs e)
{
if (Page.IsValid)
Label1.Text= MeaningOfLi
where u wrote the line like this ViewState.Add("Names", names);
what is names here. no entity found in ur code called names.
what u were trying to do.
my question was
private Dictionary<Guid, string> Names
{
get { return (Dictionary<Guid, string>)ViewState["Names"]; }
}
setter was not there but when Names.Add(Guid.NewGuid(), txtNewName.Text); this line execute it automatically add the new dictionary value in viewstate. i just want know how it is possible. plzz expain.
tbhattacharjee
|
|
|
|
|
Firstly, there is no need to re-iterate my code, it just makes your post long. You also need really to style up your code block if you have any, posts are difficult to read otherwise just highlight the code and click the button that looks like
code block
above the text
Tridip Bhattacharjee wrote: Names.Add(Guid.NewGuid(), txtNewName.Text)
This line does not add to the ViewState directly. it adds to the Dictionary object added in this
code:
var names = new Dictionary<Guid, string>{ };
ViewState.Add("Names", names);
You access the object you added through the property property, which wrappers up the viewstate calls.
Honestly,you need to try out my code first, it's simpler (it won't do what you want, but it demonstrates what is going on much better) set breakpoints and see what is happening. The Dictionary within viewstate example you have found is confusing because, if the reader hasn't got to grips with viewstate, he/she needs to figure out whether the "Add" code is adding to the ViewState Dictionary (it isn't), or the Dictionary item inside the viewstate (it is).
|
|
|
|
|
Hi
I have a JQuery date mask, but when I run the page it throws an error "Microsoft JScript runtime error: Object doesn't support this property or method".
Now, the control that this particular JQuery is meant to be working is added dynamically to a repeater control. Through this, I have looked at the ids of the control, where it was breaking and stopping in Visual Studio and what is being shown on the aspx page. The ids are identical except of the "#" that JQuery has at the start, which is not on the page.
In my JQuery code I have:
JQuery(function ($) {
$('#<%=date.ClientID %>').mask("99/99/9999");
});
Is there away to tell JQuery not to include the "#" when finding the control? I have used UniqueID but this changes any underscore into "$", which is not the same as what is on the page. My only problem is with "#" sign at the start of the ID. I have even added an alert box to check that textbox was there and it came back as null. I have tried even adding a CssClass attribute to the textbox, but this through the same error, too.
Please note that the custom user control that has the textbox is added programatically to the repeater.
Can anyone help?
Thanks
modified on Saturday, December 4, 2010 4:21 AM
|
|
|
|
|
No you can't eliminate the #, its how JQuery identifies element IDs. It sounds as though the getting the element isn't the problem, its the mask function. Are you sure you have included the proper javascript links on your page?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
This is how I have the code set up on the control, as you can see I have the JQuery function commented until I can understand and solve what is going wrong!
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MaskControl.ascx.cs" Inherits="Prototype.CommonControls.MaskControl" >
<asp:textbox id="date" runat="server" width="136px" cssclass="dateMask">
|
|
|
|