|
Hello friends, thanks for your help so far. Please, I developed a chatroom and is working fine. But the challenge here is that:
I placed the repeater control inside a panel control and set the panel scrollbars to auto. But, the panel couldn't scroll to bottom. Please, how can I make the panel control to always scroll to bottom so that users can see the last message? Please render any help. Cheers!!!
|
|
|
|
|
how to define scafolding in mvc?
|
|
|
|
|
|
IS there much difference between ASP.NET or ASP.NET MVC, or many advantages in one over the other?
Ger
Ger
|
|
|
|
|
|
Hello friend's, how is the day going? I need some help here. In my asp.net website, I have fileupload to browse for zip files and save them to a download files folder. The snippet below save uploaded files
--------------------------------------
'get extension type
Dim ext As string=Path.GetFileNameExtension(fileupload1.PostedFile.Filename)
'get filename
Dim filename As string=Path.GetFileName(fileupload1.PostedFile.Filename)
Select Case Ext 'verify file type
Case ".Zip"
'save file to download files folder
fileupload1.SaveAs(Server.MapPath("~/download files/"+ filename))
Case Else
MsgBox("file format not allowed")
End Select
--------------------------------------
the following save the file name to sql Database
Dim constr=("my connection string is here")
Dim con as new SqlConnection(constr)
con.Open()
Dim SaveFile as String="insert into filestbl(filename,desc) values(@filename,@desc)"
Dim cmd as new SqlCommand(SaveFile,constr)
cmd.Parameters.AddWithValue("@filename",filename)
cmd.Parameters.AddWithValue("@desc",txtdesc.Text)
cmd.ExecuteReader
cmd.Dispose
constr.Dispose
constr.Close
----------------------------------
the question is, how can I enable visitors to specify a folder, and code the download button so that the selected file can be downloaded to a folder specify by the person downloading the file. Note, I bind the filestbl to DatalistControl. And, when the file is downloaded, the person should be able to unzip it in his/her system just as it is in codeproject. I am doing this with Asp.net. Any help is welcome! Thanks to all.
-- modified 30-Dec-13 15:11pm.
|
|
|
|
|
I'm not sure what you asking entirely but if a user clicks on the link to download your file the browser will ask them where to save it. So, what is your question?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello friends, how was the day? Thanks for your helped so far. Please someone should tell me how to count the number of records in sql table. For example if custtbl with columns cusName, cusLoc, has the following records
---------------------------
cusName cusLoc
Tom USA
Patel India
---------------------------
How can I get the total number of records as two from table above and display it on a msgBox using asp.net? Please help.
|
|
|
|
|
Answer 1:
SqlCommand cmd = new SqlCommand("SELECT COUNT(*) FROM custtbl", databaseConnection);
int count = (int)cmd.ExecuteScalar();
There are a lot of examples on the web on how to write complete data access code in c#. Ask google.
Answer 2: adapt this ASP.Net Message Box Alert Display[^] to display the count value in a message box.
modified 28-Dec-13 10:51am.
|
|
|
|
|
Solved: waoooo Peter! It works like magic. How can I thank you? Well, thank you very much I really I appreciate.
|
|
|
|
|
Glad to hear that my solution helped. Is there a button for you to click to indicate acceptance of solution? I must admit I am still quite new in this neighbourhood.
|
|
|
|
|
Welcome to code project Peter! I love this site. The only indicator I know is to type solved in place of Re:.
|
|
|
|
|
I found it. It says:
"If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.".
Hover over the answer that you want to vote, an up arrow (upvote) and a down arrow (downvote) symbols appear for voting.
modified 29-Dec-13 20:46pm.
|
|
|
|
|
hello
i want to get LatLng (in google map) based on the textbox value.
what do i do?
i have an error when run this cod:
the error is:
Microsoft JScript runtime error: Object required
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false">
</script>
<script type="text/javascript">
var a=parseInt(document.getElementById("Text1").value);
var b=parseInt(document.getElementById("Text2").value);
var myCenter=new google.maps.LatLng(a,b);
function initialize()
{
var mapProp = {
center:myCenter,
zoom:15,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("googleMap")
,mapProp);
var marker=new google.maps.Marker({
position:myCenter,
animation:google.maps.Animation.BOUNCE
});
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<input id="Text1" type="text" value="36"/>
<input id="Text2" type="text" value="59"/>
<div id="googleMap" style="width:800px;height:500px;"></div>
modified 28-Dec-13 7:57am.
|
|
|
|
|
There are a few mistakes,
1. myCenter is not initialized
2. LatLng should be float type not integer type
3. there should be a function that is activated by say a button click in order to capture the new a and b values upon changes by the user
4. a and b have to be converted to latlng type
5. Spot the rest yourself from my demo code below:
<!DOCTYPE html>
<html>
<head>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false">
</script>
<script>
var a;
var b;
var map;
var myCenter=new google.maps.LatLng(a,b);
function initialize()
{
a=parseFloat(document.getElementById("Text1").value);
b=parseFloat(document.getElementById("Text2").value);
var myCenter= new google.maps.LatLng(a, b);
var mapProp = {
center:myCenter,
zoom:8,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
map=new google.maps.Map(document.getElementById("googleMap")
,mapProp);
var marker=new google.maps.Marker({
position:myCenter,
animation:google.maps.Animation.BOUNCE
});
marker.setMap(map);
}
function updateLocation(){
a=parseFloat(document.getElementById("Text1").value);
b=parseFloat(document.getElementById("Text2").value);
var latLng = new google.maps.LatLng(a, b); //create a latlng
map.panTo(latLng); //Make map global
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<input id="Text1" type="text" value="1.3520830"/>
<input id="Text2" type="text" value="103.819836"/>
<button onclick="updateLocation()">Update Location</button>
<div id="googleMap" style="width:800px;height:500px;"></div>
</body>
</html>
|
|
|
|
|
thank you very much
I say condolence for the suffering of martyrdom the prophet Mohammad and the Imam Hasan and the Imam Reza to all of the Muslims.
modified 1-Jan-14 11:24am.
|
|
|
|
|
Hello friends, how was the day? Someone should give me idea about this. There is this amazing look in code project that I like so much. Which is, when a cursor is hover over Discussion, dropdown menus will display where you can click other options and you will be redirected to the specified url. Please someone should kindly give me the clue to do this!!! Thanks to all.
|
|
|
|
|
Hi,You can get this look by using CSS Menu.you can create it by own or else you can download it from sites.
Have a look at this Page[^].
To learn all there is to know. I know I'll be disappointed one day, but I've made a good start, and the eventual disappointment is likely to be brief.
-Roger Wright
Never doubt that a small group of thoughtful, committed people can change the world. Indeed, it is the only thing that ever has.-Margaret Mead
|
|
|
|
|
there any projects like web cam chat between 2 systems ?,
i need immediate replay for this question
for my final year projetc
|
|
|
|
|
There may well be lots of similar projects, and no doubt Google will be able to find them for you.
Veni, vidi, abiit domum
|
|
|
|
|
i want to access the last modified time of the blob. plz help thanx in advance
|
|
|
|
|
Need more info.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello friends, I have a problem with my asp.net website under design. When visitors login, I stored their login email and password in a session i.e Session("email")=dr("email"), Session("password")=dr("password"). So that they can access their info in the home page with the session values. The concept here is that, when users login, on page load of the home page, it should display the person info on the page using the session values to query the database. It works perfectly, but, the problem is that when it get to sometime, and the page is refresh or a button is clicked, the following error occurred. Parameterized query email, password' expect parameters value @email, @password which was not supplied. I tried to modify the sessionstate as follows<sessionstate timeout="60"> but the error still occurs. What is really wrong here? If there is any other way I can store the login info without session, please tell me. I really need help. Thanks!
|
|
|
|
|
How To Change ASP.NET Session Timeout[^]
From above link: Why increasing of session timeout maybe not works
In some cases, when you increase session timeout, then run web application, session will still expire. There could be few possible reasons for this.
Notice that session timeout should be less than Application pool idle timeout, so if you increase session timeout, you have to increase application idle timeout too. Otherwise, application will get recycled. If application is recycled, sessions will expire automatically.
Also check this too
Troubleshooting Expired ASP.NET Session State and Your Options[^]
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
Ooooooh, how can I thank you thatraja? You have solved the real task for me. Thanks alot, I really appreciate.
|
|
|
|