|
Anyone have any suggestions?
|
|
|
|
|
Hi all
I've created a ASP.NET/VB.NET intranet application to maintain a database via a datagrid and was looking to retrieve the Windows username of the current user of the application so that when they click to update any changes they make, a field in the database will update showing that user as the last person to update that record.
I've set the authentication to 'windows' in the webconfig file, could anyone point me to the code I would need to retrieve the windows username?
Many Thanks
Rob
|
|
|
|
|
System.Security.Principal.WindowsIdentity.Name
only two letters away from being an asset
|
|
|
|
|
Hi Rob,
Using this 'Environment.UserName' also you will get windows username.
Kiran Kumar.CH
(MCP)
|
|
|
|
|
|
<br />
function insertAtCursor(myField, myValue)<br />
{ <br />
if (document.selection) {<br />
myField.focus();<br />
sel = document.selection.createRange();<br />
sel.text = myValue;<br />
}<br />
else if (myField.selectionStart || myField.selectionStart == '0') {<br />
var startPos = myField.selectionStart;<br />
var endPos = myField.selectionEnd;<br />
myField.value = myField.value.substring(0, startPos)<br />
+ myValue<br />
+ myField.value.substring(endPos, myField.value.length);<br />
} else {<br />
myField.value += myValue;<br />
} }<br />
------------------------------------------------------------------------------
HTML CODE
here <> = []
[form id="form1" runat="server"]
[div]
[div id="html_div"]
[div]
[FCKeditorV2:FCKeditor ID="FCKeditor2" runat="server" Height="250px" Width="590px" BasePath="/BradCRM/BradEditor/"]
[/FCKeditorV2:FCKeditor]
[/div]
[/div]
[div id="text_div" style="display: none"]
[textarea tabindex='110' name='body' cols="100" rows="20"][/textarea]
[/div]
[/div]
[/form]
------------------------------------------------------------------------------
this is workon IE but this code Does not supported by Mozilla Browser.
please Help Me.
Pavan Pareta
|
|
|
|
|
Hello all,
I'm trying to use the PathsBuildProvider as described in the following article:
http://vaultofthoughts.net/PathsBuildProviderUpdate.aspx
I am the Will Gant mentioned here, and I know I had this working several months ago when I last tried it. However, now it doesn't. I added the App_Code directory and placed an empty pbp file in it, as suggested by the article. My web.config has been altered as follows:
<compilation debug="true">
<buildproviders>
<add extension=".pbp" type="PathsBuildProvider.PathsBuildProvider, PathsBuildProvider.PathsBuildProvider">
Any thoughts?
|
|
|
|
|
<compilation debug="true" >
<buildProviders>
<add extension=".pbp" type="PathsBuildProvider.PathsBuildProvider, PathsBuildProvider.PathsBuildProvider" />
</buildProviders>
</compilation>
|
|
|
|
|
Why and what can I do about it?
I have a calendar control that is contained within an update panel. It all works nice and smoothly and I am happy with it. Demonstrating the app to colleagues and the talk came about as to why I didn’t create a client side calendar control with javascript rather than use the standard asp one. My argument was that the control does what its supposed to and works. He said that if we rolled this out to a customer the amount of data being posted back would mean a slowing down of the app(some of our customers only access is through dial up.) ah ha I said that should not be a problem cos its in an update panel so the whole page is not being posted back only the calendar is!
He then went on to disabuse me of the notion that even thought that is what is supposed to happen asp.net sends back viewstate and rendering info for the whole page!!? From what I have read around the net he appears to be correct as well, its something to do with the page renderer requiring hash codes or something for all the controls on the page. Now this seems poor to me, the only advantage to using this now is cosmetic and I can do without that if its gonna slow my app down.
Has anyone had any experience with this? Am I better to code up a javascript calendar control, and use that or is the pay off between amount of code downloaded for that compared to the data posted back for the Ajax update panel mean that it’s a much of a muchness? I am pretty new to asp and web dev so if anyone can offer a differing method to partially update the page that would also be appreciated…any links to tutorials or lessons or what not, you know the kinda thing The performance hit seems to be the biggest deciding factor in this company as to what tech to use in a certain situation.
Cheers
Ian
|
|
|
|
|
unfortunately I've had experience with unrealistic expectations of what Ajax can do.
How long would it take to write a Jarascript only version? what about the size of the initial down load with all the Javascript? what about support for different browsers?
you can Still use the calendar control and use Ajax without the update panel by handling the Java script events.
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: what about the size of the initial down load with all the Javascript?
That's the important thing I think. Whether the postback of the viewstate will be cumulatively less than the initial download of a dhtml/javascript calendar control.
Cheers
Ian
|
|
|
|
|
Hi
How can i accept only numeric value in a textbox.
I mean i need to restrict the input to numbers.
Can anyone help plz
Jats
|
|
|
|
|
|
Handle the Javascript events for the keys
only two letters away from being an asset
|
|
|
|
|
regex validator with the regex as ^[0-9]+$
|
|
|
|
|
You may use this JavaScript function and call it from the KeyPress event
function NumericOnly_onkeypress(p)
{
if(window.event.keyCode<48 || window.event.keyCode>57 )
{
window.event.keyCode=false;
return false;
}
}
|
|
|
|
|
|
Don't use Very Urgent as a title
only two letters away from being an asset
|
|
|
|
|
But I search for messages with urgent in the subject so I can help people that need it quickly first!
|
|
|
|
|
You have been told before not to use urgent as your message title. At this point I would be surprised it anyone helps you because you obviously do not listen!
__________________
Bob is my homeboy.
|
|
|
|
|
The context of the message is important. Forums help people. You can not preempt for help out of your own whims and fancies.
I have compiled a list of points long back on 'How to best harness the benefits of discussion forums'. I would like to share the URL here: http://www.dotnetspider.com/kb/Article1703.aspx[^]
|
|
|
|
|
I am doing a Project that is in ASP.NET 2.0 and C# with SQL Server 2000 on Windows XP.
through Programming I am creating a PDF document and inserting some values into that.After that I am sending this PDF doc in mail attachment to some mail ID.
initially PDF was corrupting and one page was corrupt.(Error was cooming :An error exists on this page.Acrobat may not display the page correctly.Please
contact the person who cretaed the PDF document to correct the problem.)
Then I used UUEncoding then Mail attchment was comming properly to other mail accounts like yahoo etc.but it was cooming to gmail account in plain text format instead of attchment.
what's wrong I am doing???
What is the solution for that??Plz help me in this regard as soon as possible.
you can mail me at adil@vsoftconsulting.com
adil kazmi
|
|
|
|
|
I have an asp .net page that does not work propery when it is displayed in an iframe in another site. The other site was done in Dream Weaver. I think, but not sure, the problem is cause by session id's in the asp .net page losing their values. Any ideas as to what the problem is?
|
|
|
|
|
I think the problem is caused by session id's in the asp.net page losing their values.
Sorry couldn't resist that Instead of using session id's could you pass them across to the ipage as page parameters? i use a javascript function to do it like, but you can do it in your own way...here is my javascript code just in case.
document.getElementById('uiRecipientList').src = encodeURI('SupportCustomerSearch.aspx?search='+strSearchTerm+'&code='+strCode);
in the above the uiRecipientList is the id of my Iframe. Hope that helps.
Cheers
Ian
|
|
|
|
|
i have simply connect the data and insert the data and show GridView first TextBox and a Command Button enter the Data into text and click command Button and Submit the data insert the Data into DataBase after insert the dataBase when refresh the data and each time data inserted in the data base.
|
|
|
|