|
nclauder wrote: I want when one selects one radiobutton the corresponding image
appears along: Visible="True".
When radio button got the click call one javascript function. use the following code for hiding and showing image, let me assume all your image having unique id's.
document.getElementById("imageid").style.visibility = "none"
document.getElementById("imageid").style.visibility = "block"
|
|
|
|
|
Thanks Navaneeth,
I'm getting a little bit lost. When you give me this code how I'm i supposed to fix it into my code this is the code I'm using for the radiobutton.
The behind code:
protected void rblmood_SelectedIndexChanged(object sender,System.EventArgs e)
{
RadioButtonList rbl = (RadioButtonList)sender;
Control parent = rbl.Parent;
while(!(parent is System.Web.UI.WebControls.DataGridItem))
{
parent = parent.Parent;
}
}
protected int SetState(object st)
{
string state = st.ToString();
if(state.Equals("True"))
{
return 0;
}
else
{
return 1;
}
}
Html code is:
<asp:templatecolumn headertext="Mood Today">
<itemtemplate>
<asp:image id="imggm" runat="server" visible="False" imageurl="file:///C:\Inetpub\wwwroot\DashBoard\Moods\laughing.gif">
<asp:image id="imgbm" runat="server" visible="False" imageurl="file:///C:\Inetpub\wwwroot\DashBoard\Moods\sad.gif">
<asp:label id="Label2" runat="server" text="<%# DataBinder.Eval(Container,"DataItem.MoodToday")%>">Label
<edititemtemplate>
<asp:radiobuttonlist id="rblmood" runat="server" width="104px" autopostback="True" selectedindex="<%#SetState(DataBinder.Eval(Container.DataItem,"MoodToday"))%>" height="40px">
<asp:listitem value="Good Mood">Good Mood
<asp:listitem value="Bad Mood">Bad Mood
Thanks.
-- modified at 5:03 Friday 9th March, 2007
|
|
|
|
|
I have just tried your advice but I get an error:
The type or namespace name 'document' could not be found (are you missing a using directive or an assembly reference?)
What wrong?
Thanks.
|
|
|
|
|
Hi all
i have one doubt
How many config files we can have in one project ?
From my knowledge we can have as many as we have Directoreis in the project i.e each web.config for each directory ?
Here Directory Means What ? Folder where i have my pages here i am confused )
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
sandeep akhare wrote: How many config files we can have in one project ?
I think we can have only one web.config file for one website. If you are placing web.config file for each directories, i think it will be treated as different websites. Normally in my projects i do use directories. But all files inside these directories will be referring the root config file only.
|
|
|
|
|
HI Navaneeth
i thought same but after reading in MSDN i am confused
From MSDN
Configuration File Hierarchy and Inheritance
Each Web.config file applies configuration settings to the directory that it is in and to all of the child directories below it. Settings in child directories can optionally override or modify settings that are specified in parent directories. Configuration settings in a Web.config file can optionally be applied to individual files or subdirectories by specifying a path in a location element.
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Hi Sandeep
That was a good post.
sandeep akhare wrote: Each Web.config file applies configuration settings to the directory that it is in and to all of the child directories below it. Settings in child directories can optionally override or modify settings that are specified in parent directories
I tried this but i am getting error. Still it is refering the parent config file only. Any idea to override that in child directories ?
|
|
|
|
|
Navaneethkn wrote: That was a good post.
Thanks Navaneeth
Thats why i am also confused i didn't try it out but should know basic concept behind it thats why posted on forum
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Hi u can use more than one webconfig file in ur project,
its possible,but one webconfig file will be in normal,
other webconfig files want to be based on where its used in that folders we want to put it...........,
eg:take role based authentication,
eg,admin,user each one have diff roles,so in admin folder u must tell ur webcofig file for that,
like that user folder also u want to mention ur webconfig,
then normally outside one webconfig file will be there....
i hope u will understood..........
Magi
|
|
|
|
|
Thats nice
but can you provide one example/article where i can play with it
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
have the coding to encrypt password:
private void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack == false) {
ddlChooseAlgo.Items.Add("");
ddlChooseAlgo.SelectedValue = "";
}
}
private void cmdEncryptValue_Click(object sender, System.EventArgs e)
{
txtShowValue.Text = FormsAuthentication.HashPasswordForStoringInConfigFile(txtGetValue.Text, ddlChooseAlgo.SelectedValue);
}
Here the encryted value is dispalyed in the textbox.My problem is to insert the encrypted password value into sql database...Please anyone give me a idea to insert into sql
With Regards,
Samson
|
|
|
|
|
samsonx wrote: Here the encryted value is dispalyed in the textbox
If the value is displayed in the textbox what is the problem for inserting that to database ?
samsonx wrote: Please anyone give me a idea to insert into sql
Create connection using SQLConnection class. Write query in command and call ExecuteNonQuery()
|
|
|
|
|
Hi:
I have created a simple web page and was able to published. Anyhow, I went back and create a master page. How can I tied the rest of the pages onto my master page.
I found most example showed how to create a master page then create a default.aspx then selected master page to attch them together.
Thanks in advance.
Eyungwah
|
|
|
|
|
if u want the master page remain the same for ur entire application,
configure it in ur web.config file in the following way.....
-----<configuration>
<system.web>
<pages masterpagefile="~/MasterPage_DefaultContent.master">
----
or...
if u want this to be master page for some of ur aspx pages then include the Page directive in ur aspx page and assign the master file in the masterfile attribute of the page directive...
mareers
|
|
|
|
|
f u want the master page remain the same for ur entire application,
configure it in ur web.config file in the following way.....
-----
in configuration tag
then system.web tag
in pages tag specify the location of ur masterfile in the masterpagefile attribute
close pages tag
close system.web tag
close configuration tag
----
or...
if u want this to be master page for some of ur aspx pages then include the Page directive in ur aspx page and assign the master file in the masterfile attribute of the page directive...
mareers
|
|
|
|
|
|
how can i open modal and modeless dialouge box in asp.net?
thks.
yesu
|
|
|
|
|
|
You can only do this in IE. Only cross-browser option is to use DHTML features to popup a single div with a shim over the rest of the page.
|
|
|
|
|
I have a "Delete" button in an aspx page. When I click the "Delete" button, I need to get the number of records from the database and display it in a confirmation box. If the response is "OK" I can continue with the delete operation, if the response is "Cancel" I should stop further processing.
How to show the confirmation box and how to capture the return value of the confirmation box?
|
|
|
|
|
confirmation box can be shown using java script.....
try it out...
mareers
|
|
|
|
|
Hi,
For displaying popup message on clicking of an asp button, you can call a javascript function.
Button1.Attributes.Add("OnClick","return TestPopupFunction();");
In this javascript function:
<script language="javascript" type="text/javascript">
function TestPopupFunction()
{
var a = confirm("Are you sure you want to delete?");
if (a == true)
{
}
else
{
return false;
}
}
</script>
Hope this helps you.
Harini
|
|
|
|
|
But I need to get the number of records from the database and display it on the confirmation box.
Like
"Table has 20 records
Do you want to continue?"
|
|
|
|
|
Hi
Add one hidden field in your web app for storing number of records.
On loading web app, get the number of records and assign in a hidden variable. Your message should concatenate with this value.
For eg.,
var vConfirmMsg = "Table has " + document.getElementById('hidden id').innerHTML + " records. Do you want to continue?";
and continue with the code as I gave earlier
var a = confirm(vConfirmMsg)
Hope this is clear
Harini
|
|
|
|
|
What if the situation is like this?
I have a list box in my aspx page. I can select more than one departments from the list box. On clicking the delete button, I should get the number of records in each departments and display the departments and number of recokds in the confirmation box.
Can I use the same method for this situation also?
|
|
|
|