|
Assume that we have 2 classes
Class A
{
int AID;
string Aname ;
string Address;
B objB;
public B BData
get
{
return objB;
}
set
{
objB=value;
}
}
Class B
{
int BID;
string Bname;
string BPhone;
}
i have a dropdown with name ddl1
the following lines are not working
ddl1.datasource=objA;
ddl1.datatextfield="Aname";
ddl1.dataValuefield="BData.BID";
Don't be surprised my requirement is something like this.
Question 2: i am creating datagrid, itemtemplates dynamically. how do i bind nested objects to the grid.
|
|
|
|
|
Plz help
i have three panels and three images. on mouseover of one image one panel is displayed and other two images except the image that fires event are displayed. what i want is to display espand the displaying image slowly. what shall i do in javascript.
Thanx
|
|
|
|
|
You can use setTimeout method. Search in google you will get a lots of an example.
please don't forget to vote on the post that helped you.
|
|
|
|
|
i used it but it didn't work properly. even i tried with recursion and setimeout to expand panel by width but couldn't succeed.
|
|
|
|
|
Hello,
I've a div and a link. And i want to show the div if the it's not visible and hide the div if it's shown. It's working fine in Normal web page but not working in Content Page of Master Page
Throwing an "Object Required" Error
|
|
|
|
|
I guess this means your code is broken. Can we see it ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
<script language="javascript">
function showDiv(divID)
{
e=document.getElementById(divID);
if(e.style.display=="none")
{
e.style.display="block";
}
else
{
e.style.display="none";
}
}
</script>
<div id="divChangePassword" style="border:solid 1px black; width:400px;top:125px;left:450px;position:absolute;display:block; background-color:#efefef;" runat="server">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td colspan="2" align="right" class="manojHeaderStrip1">
Add Main Topic
<a href="#" onclick="showDiv('divChangePassword');" title="Close" style="text-align:right;color:Red;color:White;font-size:8.5pt;">[Close]</a>
</td>
</tr>
<tr>
<td colspan="2" height="10">
</td>
</tr>
<tr>
<td style="width: 50%" class="manojTDRight">
Enter Main Topic Name</td>
<td style="width: 100px">
<asp:TextBox ID="txtName" runat="server" CssClass="manojTextBox1" ReadOnly="True"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 50%; height: 19px;">
</td>
<td style="width: 100px; height: 19px;">
</td>
</tr>
<tr>
<td style="width: 50%; height: 24px;" class="manojTDRight">
<input type="submit" id="cmdSubmit1" value="Submit" runat="server"/>
</td>
<td style="width: 100px; height: 24px;" class="manojTDLeft">
<asp:Button ID="cmdReset1" Text="Reset" runat="server" OnClick="cmdReset1_Click"/>
</td>
</tr>
<tr>
<td class="manojTDRight" style="width: 50%">
</td>
<td class="manojTDLeft">
</td>
</tr>
<tr>
<td class="manojTDRight" colspan="2">
<asp:Label ID="lblMsg1" runat="server"></asp:Label></td>
</tr>
</table>
</div>
<a href="#" onclick="showDiv('divChangePassword');" class="manojLink" tabindex="2" title="Click Here To Change Your Password">Change Your Password</a>
As you click on this link it'll hide or show the div. But it's not working in content Page of Master Page
|
|
|
|
|
.NET- India wrote: As you click on this link it'll hide or show the div. But it's not working in content Page of Master Page
It is shown in normal but not shown in content page because ID of div tag will be change when it render in content page.
Solution : Run page,view source and check what is ID of Div tag and then use that ID instead of "divChangePassword"
I think It Should be ContentPageID_DivID
Regard
kHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
Why would it change ? It's not a server control is it ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: Why would it change ? It's not a server control is it ?
Because he used runat="server" thats why ID would be changed.
see div id="divChangePassword" style="border:solid 1px black; width:400px;top:125px;left:450px;position:absolute;display:block; background-color:#efefef;" runat="server"
please don't forget to vote on the post that helped you.
|
|
|
|
|
I didn't spot that, then you are absolutely correct.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yes the id of the div is being changed it's being "ctl00_ContentPlaceHolder1_divChangePassword"
but still it's not working...........
|
|
|
|
|
Change your code
onclick="showDiv('ctl00_ContentPlaceHolder1_divChangePassword');"
please don't forget to vote on the post that helped you.
|
|
|
|
|
i've done it but still it's throwing the same error
|
|
|
|
|
Why do you have runat="server" ? Can you remove it ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Do you have firefox/firebug ? I'd investigate this by setting a breakpoint in the script and checking the script itself to make sure all the bits are where you expect them
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
I'll use SqlMembership for all user-related operations. Does it have built-in protection against exploits like sql injection like SqlParameter does? How secure is it? Do I need to worry when I use it and implement my own checks?
|
|
|
|
|
Only way to be sure, is to not use it. I assume it's safe tho.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Dream on. Best you could do, is to make AJAX calls to a server who can connect. You can't connect to a SQL database that's on the local network, unless the server can see it over the internet ( or the server is running on the same network as the database )
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Use AJAx
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
hi. in a composite control there is a textbox & a embedded javascript file. i want to access textbox at client side in embedded javascript file as:
var TxtBx = document.getElementById('<%= this.TextBox1.ClientId %>');
but this raises error. can any tell me where am i wrong?
|
|
|
|
|
Try something like this:
var TextBox1 = $get('<%=TextBox1.ClientID%>');
alert(TextBox1.value);
Hope it helps u...
|
|
|
|
|
I doubt this will work if what he posted is not working.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|