|
i think it's impossible,
please tell me the answer
|
|
|
|
|
Hi All,
I have used a TreeView control which is placed in a Div tag in the master page. Whenever the TreeView controls items exceeds the limit of the Div tag it gives the vertical and horizantol scroll bars. It is Ok.
But when the items are not exceeding still it is giving the scroll bar in disable mode. What I want is the scroll bars should not appear when the items are within the limit means when the scroll bars are in disable mode they should not be visible and when they are enabled they should be automatically visible.
I want to do it by using any CSS class. Can anybody advice me to do it by using any CSS class.
Thanks,
Md Abdul Aleem
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
|
Hi All,
I read the link but I am unable to judge it satisfies my condition or not.
I have a div tag as below and I want to make the scroll bar invisible when the tree view control is within the div tags limit means when it is not required the scroll bars should become invisible and when the tree view opens and exceeds the limit of the div tag the scroll bars should come automatically.
<div id="TreeViewContainer2" class="inline">
<asp:TreeView ID="treeId" runat="server" SkinId="ExplorerLines" onselectednodechanged="treeId_SelectedNodeChanged" ExpandDepth="1" OnUnload="treeId_Unload" ForeColor="#000099"></asp:TreeView>
</div>
Can anybody please help me in doing this.
Thanks in advance,
Md. Abdul Aleem.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
Hi,
I have some short questions about locking threads in ASP.NET. Normally I use C# console/winforms but in this case I need to write it in VB for ASP.NET. My questions are there any drawbacks to this code in a high-volume of requests? Is this completely wrong for an ASP.NET application? If so what do you recommend? The purpose here is to lock a timestamp and be sure it is set uniquely throughout all the sessions on the web server:
Protected Shared TimeStamp As Date
Protected Shared Sub SetUniqueTimeStamp()
Try
' Request the lock, and block until it is obtained.
Monitor.Enter(TimeStamp)
' When the lock is obtained, set the Timestamp.
TimeStamp = Now
Finally
'Guarantee at least 1ms tick for uniqueness
Thread.Sleep(1)
' Ensure that the lock is released.
Monitor.Exit(TimeStamp)
End Try
End Sub
This is just an example based on some code I altered from this at MSDN: Monitor.Enter Method[^]
Many thanks in advance!
modified on Tuesday, April 14, 2009 10:02 AM
|
|
|
|
|
Hi All,
Im looking for a free solution/approach to capturing video from a clients webcam and sending back the recorded video to my server (IIS).
Flash player, Javascript, silverlight, asp .net, etc..
Any Ideas?
Thanks
M
|
|
|
|
|
i am using sql server 2005 express and i have one web site which is i have published and installed on machine but when connecting to sql server 2005 express getting error login failed mycomname/ASPNet user why not taking user name insted of aspnet how do i login my con string is as follws
<add name="EMSConnectionString" connectionString="Data Source=.\sqlexpress ;Initial Catalog=EMS;intigrated security=true" providerName="System.Data.SqlClient"/>
|
|
|
|
|
nikhil1234 wrote: why not taking user name insted of aspnet how do i login my con string is as follws
<add name="EMSConnectionString" connectionstring="Data Source=.\sqlexpress ;Initial Catalog=EMS;intigrated security=true" providername="System.Data.SqlClient">
Your web application is running in the context of the ASPNET user. Therefore, when you use integrated security you will log in with the credentials of the user that your process is running as. This is the correct functionality.
You must grant the appropriate access to the ASPNET user to the database.
Possibly the reason you did not see this when you were developing the web site is that Visual Studio has its own built in Web Server that uses your credentials. When you deploy to IIS you use the credentials IIS uses.
|
|
|
|
|
intigrated security=true
integrated security=true
Try that.
var question = (_2b || !(_2b));
|
|
|
|
|
It is true by default, so that typo would likely have been ignored.
|
|
|
|
|
Fair enough, I probably should have read the question first, but that typo kinda blinded me straight on.
And thanks, I didn't know Integrated security was true by default.
var question = (_2b || !(_2b));
|
|
|
|
|
hi
function window.onunload()
{
if (window.event.clientX < 0 && window.event.clientY < 0)
{
//call Session.Abandon()
}
}
in above funcion i am check browser closed button is press or not when button is press i want to close the session just like a Session.Abandon()(server side function). and second question is my project above 200 web form are there and every page redirect to another page so how can i used above code only single time
|
|
|
|
|
You can do one thing
if(window.event.clientX < 0 && window.event.clientY <0)
{
window.open("CloseSession.aspx", "OpenWindow_Close_Session",'left=12000,top=1200,width=10,height=1');
}
In CloseSession.aspx Page Load Do the server side task and make it self.Close();
protected void Page_Load(object sender, EventArgs e)
{
Session.Abandon();
string strPopupScript = "<script language="javascript">self.close();</script>";
Page.ClientScript.RegisterStartupScript(typeof(Page), "PopUpScript", strPopupScript);
}
Hope this will help you.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
but sir i cannot put this code my above 200 web page
|
|
|
|
|
So you don't have master page ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
you don't have to. Another alternative is create web handler page (ashx page) put the functionality Abhijit provided in the ProcessRequest call it using ajax.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Yup Excelent... That is the best option, if you don't have the master page you can simply do it using handler other wise write the same in master page.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I am facing a unique problem (looks unique to me at least). I have a dropdown whose auto-postback is enabled. User can select a value from the dropdown to go to another page. But when the user comes back to original page by clicking the back button on the browser and clicks any button then on the post-back caused by the button, first the "SelectedIndexChanged" event handler of that dropdown is called then the "Click" event handler of this button is called. Hope I have explained the problem clearly.
Can anyone tell me what's going wrong and how to solve the issue?
|
|
|
|
|
Just put the code that you have written for redirect to different page of Dropdownlist SelectedIndexChanged.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I did the same but it is not working......looks like the browser is remembering the previous state of the page and so is causing the previous event to be raised in addition the present event..... I think I have to take help of javascript. Thank for the reply
|
|
|
|
|
om pr wrote: I did the same but it is not working....
But I didn't suggested you to do any thing. I have just asked you to put those selected index change code.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Can you be a bit more elaborate. I did not understand what you want to suggest!
|
|
|
|
|
om pr wrote: Can anyone tell me what's going wrong and how to solve the issue?
I suspect that what is happening is that when you go back the browser remembers the state of the controls when you originally left the page and sets them to those values. However, this time the value change for the drop down does not trigger a post back.
When you press the button the postback is triggered. The server then compares what is in the viewstate with what the controls now look like and raise events for any changes. Because it sees two changes (the drop down and the button click) those events are raised.
A possible route to solving the issue is to turn off the viewstate (which also means you won't get change events, although you will still get button click events) and detect the drop down change yourself rather than rely on ASP.NET.
|
|
|
|
|
Thanks for the reply Colin, I tried all possible options including disabling the viewstate as suggested by you but it all failed. I just managed to solve the issue with the help of javascript. Instead of sending the user to the next page via Response.Redirect on the index change of the dropdown, I am now doing the same with the help of simple javascript i.e. window.location.href. Thanks again for the reply, appreciate it!
|
|
|
|
|
What happens if the user has disabled javascript?
|
|
|
|