|
Hi,
How do you set the background color of a WebForm programatically. I know I can change the color by adjusting the HTML code, but I want the user to set the color in the Web.config file. This so the user can set the color to match their logo, also set in Web.config.
I can set the background color of labels, panels, etc, just can't figure out how to set the background color for the actual WebForm.
Thank you,
Glenn
|
|
|
|
|
Add the runat="server" and id attribute to the body tag.
Then you can refrence the body from codebehind, read the setting from web.config and set the background property (or appropriate style).
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi,
how to call javascript function from codebehind file in asp.net using vb.net language.
Please help me,
Thanks,
Chetan Visodiya
|
|
|
|
|
lnBtnCancel.Attributes["onclick"]="clearConfirm();";
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
You can't call a Javascript function from ASP.NET code. The Javascript only exists in the browser, and the ASP.NET code only exists on the server.
If you wan't to call a Javascript function when the page loads in the browser, you have to add Javascript code on the page to call the function:
Page.RegisterStartupScript("<script type=\"text/javascript\">myfunction();</script>");
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Thanks for giving me answer.
I know that how to call javascript when button is clicked but i want when page is load at that time call javascript function. So please tell briefly where to write this code because i write this code in codebehind file but RegisterStartupScript is not the property of page object.
Please help me
Chetan B. Visodiya
|
|
|
|
|
Chetan.visodiya wrote: i write this code in codebehind file but RegisterStartupScript is not the property of page object.
Yes it is.
MSDN: Page.RegisterStartupScript Method[^]
---
b { font-weight: normal; }
|
|
|
|
|
Hi guys...
I'm having some problems with installing iis...
I shutdown my computer on friday after working on a new site in VisualStudio (server is localhost). I left it in a fine state, so i thought. Booted my computer on Sunday to do a little more and was unable to start my local host server! I cant think what would have caused this? Its now Tuesday and am still unable to start the server. I have un-installed iis and tried to re-install, unfortunatly i was prompted with multiple msg's (unable to copy certain .dll files) i've tried various fix it cmds like: esentutl /p %windir%\security\database\secedit.sdb
This or any other command i have tried has not worked. Microsoft has lots of info about how to try and resolve this issue but all have been unsuccessful.
Can anyone help me?
|
|
|
|
|
Hi All
Can any one tell How to make webservice as statefull
Rizwan Afsar
-- modified at 2:36 Wednesday 5th April, 2006
|
|
|
|
|
add this to every method which u want to be with state in web services
[ WebMethod(EnableSession=true) ]
bye sexy
Amit Sood
Say thanx to me
|
|
|
|
|
Try this one also
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci983935,00.html
Amit Sood
Associate Member, Technical Team
IAP Company Ltd, Gurgaon
|
|
|
|
|
I want to show Ads on my web pages but Norton Internet Security (NIS) blocks this Ads when i have ON 'Ads Blocking' fettures of NIS .
can you pls explain me Why this happened or there is any posibility to solve this problem?
Thanks
Shippya
|
|
|
|
|
|
I am having problems with CSS.
<div id="point0" class="notes">
<a href="#">
I have 9 points, each like the one above that I am trying to position on a map.
.notes a {background-color: blue; color: white; width: 20px; height: 20px; z-index: 2; overflow: hidden}
For some reason, it is only appyling to the first point, point0. All other point elements are set to the "notes" class. Also, when I try to place that point on the map, it disappears. Like it is hidden behind the map.
The map is defined as:
#lpmap {position: absolute; left: 0; top: 0; height: 294px; width: 600px; z-index: 1}
Any help with this would be greatly appreciated!
-- modified at 22:43 Monday 3rd April, 2006
|
|
|
|
|
You need closing tags, or you will end up with all links in the same div tag:
<div id="point0" class="notes">
<a href="#"><img src="image0.jpg" alt="" /></a>
</div>
juztten wrote: For some reason, it is only appyling to the first point, point0.
What is only applying? I don't see anyting at all in your code that would position the tags.
---
b { font-weight: normal; }
|
|
|
|
|
Cross window scripting
Ello. I've got a problem with cross window scripting.
What I have is form in php with elements written in for loop. Something like:
for(int $i=0; $i<5; $i++) {
echo '';
}
From that form I can call a javascript popup window.
How can I change value in parent window from javascript popup ?
I've tried with:
opener.document.myForm.bee[ind].value=val;
where ind is some index and val is value which I want to pass to opener. But it doesn't work. It works only when bee isn't array. But when it is an array what should I do?
Thnx in advance.
Soleil
-- modified at 0:27 Tuesday 4th April, 2006
|
|
|
|
|
[] is onyl for PHP to know that you are sending a array. JavaScript does not know this.
You will have to set a unique ID to every textbox and then you can access it with:
opener.document.getElementById()
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I'd like to set up a site for different user (groups) with different user (group)rights. So i can decide which user or user group have access to what content.
I 'm in search of a CMS with a very detailed user (group) management system. I know phpbb can handle that. Is there anyother out there besides phpbb?
|
|
|
|
|
Have you looked at DNN[^]
We use it over at WDevs and it allows a fine grain control of users and their permissions.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
If you are looking for a PHP based CMS and you need advanced user rights managment then typo3 is the way to go
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
hi
I have a gridview and a delete button inside it. I want to show a javascript confirmation dialogue box on the click of this button . How can achieve this.?
waiting ur reply .
thanx
sandeep
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
These are the steps you need to follow
Step1:In your form example(form1.aspx.cs)put this code remember it soould be protected void
protected void Imagebutton10_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
this.Page.RegisterStartupScript("SetConfirm", "window.Form1['DisplayConfirm'].value=true;");
this.Page.RegisterStartupScript("SetConfirm", "window.Form1['DisplayConfirm'].value=false;");
ImageButton Imagebutton=(ImageButton)sender;
DataGridItem dgi=(DataGridItem)Imagebutton.Parent.Parent;
ViewState["BookMarkID"]=this.dg_SearchCondition.Items[dgi.DataSetIndex].Cells[5].Text;
}
Step2:In HTML of your page Paste this code
<itemtemplate>
<asp:imagebutton id="Imagebutton10" <b="">onclick="Imagebutton10_Click" runat="server" ImageUrl="image\delete.bmp">
Step3: Declear a java script function in your HTML
function displayMessage()
{
if(window.Form1["DisplayConfirm"].value==true || window.Form1["DisplayConfirm"].value=="true")
{
if(confirm(" Do you want to delete?")==true)
{
window.Form1["Button3"].click();
}
}
Step4: Call this function on form body load
onload="displayMessage();"
step5:Take a button named "Button3" on ur page make it small so that it sould not be visible on page load.
step6:Take HTML Hidden text box with name example on your page
Rizwan Afsar
Associate Member, Technical Team
IAP Company Ltd, Gurgaon
-- modified at 7:59 Tuesday 4th April, 2006
|
|
|
|
|
Hello All,
I have two web sites, with following names (for example) www.webserver1.com and www.webserver2.com.
now for both the servers I am using ASP.Net and now my doubt is, can i retrive the value of a cookie from www.webserver2.com which is created by www.webserver1.com
In brief, can we access and retrive the values of a particular cookie which is created by some other server.
thanks in advance
Naga Raju Epuri
+91 9885758884
|
|
|
|
|
No.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|