|
Hi,
have you add ?
if (!ispostback)
{
}
|
|
|
|
|
Hi,
I think you are writing the code like this
if (!IsPostBack)
{
if (CheckBox1.Checked == true)
{
TextBox3.Visible = true;
}
else if (CheckBox1.Checked == false)
{
TextBox3.Visible = false;
}
}
remove the !IsPostBack condition and try then it will work.
Bhanu
|
|
|
|
|
Hi,
Can anybody suggest me an idea , that how can i run ffmpeg.exe in my web server, as my web server is running in shared hosting, bcoz of it i do not have execute permission.
thanks regards
|
|
|
|
|
You may not ask in a discussion forum tips on hacking and compromising the security of network which is unethical.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Actually u misunderstood my intentions.
What i am facing is that,i have developed a video upload site where mpeg or avi format is converted into flv format through ffmpeg.exe, it is running fine in local system , but as i am using share hosting facility i cannot run ffmpeg.exe as i do not have execute permission.
That's y i ask for a soln.
|
|
|
|
|
If your provider is not providing executable permission, then you won't be able to do this.
|
|
|
|
|
Hi all i have developed an asp.net 2.0 application with sql2005. it is running ok at my pc. When i tried to deploy it at the customer site i am receiving an error when i hit login. I can acccess the login page but when i enter username and password and press login i get the following error:
System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
I have Allow remote connections using TCP/IP enabled on
any ideas???
|
|
|
|
|
Hi gurus, I'm creating an application with scalability in mind. In my application, I'll have forums used by different groups of people (each group will have their own forums). I will start from 1000 or 2000 groups with the potential to grow until 5000 groups (it's guaranteed that I won't exceed that number of groups, 5000, based on the nature of my application). I was thinking that having all the forum posts in one table will cause many problems like having a very large index and slow search among other problems (as I want to have many indexes on the table like the PostID, ForumID, GroupID and PostDate), so, I was thinking that it might be better to have a separate table for each group's forum posts in order to have small indexes so that I have faster searches and inserts take less time (esp. that some groups are expected to have a large number of posts per day) and also to be easier to move the tables to other database servers in case the application grows and so the web farm. Now I'm really confused how to design my DAL.
Assuming that the structure of the forum posts table is like that (this is just a simplified structure not the real one):
CREATE TABLE ForumPosts_x
(
PostID INT IDENTITY(1,1) PRIMARY KEY,
ForumID INT NOT NULL, -- which refers to the ForumID in another table named Forums which includes all forums for all groups
ParentPostID INT NULL,
PostSubject NVARCHAR(200) NOT NULL,
PostText NVARCHAR(5000) NOT NULL,
PostDate DATETIME NOT NULL DEFAULT GETUTCDATE()
)
Note that there's no group ID as x in the table name will be the group id e.g. ForumPosts_19 for group id 19
Now as to designing my DAL, should I:
1. Create stored procedures with dynamic SQL and pass the group id to the procedure i.e. use EXEC and sp_executesql (there's an interesting article on the subject here: http://www.sommarskog.se/dynamic_sql.html)
For example:
CREATE PROCEDURE InsertForumPost
@GroupID INT,
@ForumID INT,
@ParentPostID INT,
@PostSubject NVARCHAR(200),
@PostText NVARCHAR(5000)
AS
DECLARE @tablename NVARCHAR(50), @sql NVARCHAR(4000)
SET @tablename = N'ForumPosts_' + @GroupID
SET @sql = N'INSERT INTO dbo.' + quotename(@tblname) +
' (ForumID, ParentPostID, PostSubject, PostText) VALUES (' +
'@ForumID, @ParentPostID, @PostSubject, @PostText)'
EXEC sp_executesql @sql, N'@ForumID INT, @ParentPostID INT, @PostSubject NVARCHAR(200), @PostText NVARCHAR(5000)', @ForumID, @ParentPostID, @PostSubject, @PostText
2. Create the procedures with static SQL for each group. i.e. each group has its own set of procedures which would make us have a large number of procedures
For example, the procedure for inserting a new forum post for GroupID #19 would be:
CREATE PROCEDURE InsertForumPost_19
@GroupID INT,
@ForumID INT,
@ParentPostID INT,
@PostSubject NVARCHAR(200),
@PostText NVARCHAR(5000)
AS
INSERT INTO dbo.ForumPosts_19
(ForumID, ParentPostID, PostSubject, PostText)
VALUES
(@ForumID, @ParentPostID, @PostSubject, @PostText)
3. Use SQL text directly in my code, C# in my case (which I'm highly considering but a little concerned about how to execute multiple SQL statements - as you have in stored procedures - without having to call ExecuteNonQuery() multiple times, which I believe could affect performance)
4. Drop the whole thing and stick to using one table for all the groups
What would you do if you were designing such application? Any suggestions are highly appreciated...
|
|
|
|
|
Hey Please help me.
i have a login page and when user try to logon on webpage i save userId in session and i check if session is null then redirect to login else stay.
But i have that problem at if user not move the mouse or not are front the computer about 2 minutes , the session redirct to login page ? how can i disiable that funktion or what can i do .
the application is writen in C# asp.net
Thanks very mutch.
Sorry my english.
|
|
|
|
|
i think it not possible it is possible to decrease session or increase session in web.config at your connection string......
<connectionstrings>
<add name="TRDConnectionString" connectionstring="Data Source=(local);Initial Catalog=Trade;User ID=123;Password=123;timeout=60" providername="System.Data.SqlClient">
your can increase or decrease the TimeOut optin.........
send feed back to sk.haneef@gmail.com
|
|
|
|
|
thank you.
But how can i do it ?
do you have any idea?
|
|
|
|
|
i think it not possible it is possible to decrease session or increase session in web.config at your connection string......
add name="TRDConnectionString" connectionString="Data Source=(local);Initial Catalog=Trade;User ID=123;Password=123;timeout=60" providerName="System.Data.SqlClient"
your can increase or decrease the TimeOut optin.........
send feed back to sk.haneef@gmail.com
|
|
|
|
|
Hello,
I forget the what code looks like, but it is do-able.
You can search at google, with keyword "setting session in web config asp.net".
I'm sorry, but i really forget. :p
|
|
|
|
|
I am working on a website of party organizing website. But there me need a feature to import the contact in hotmail,yahoo and gmail to my database. How its possible? Can any one give me the sample codes to develop the feature. Please help me.
I have searched the site, from there they are giving paid services. So how to develop the things? Can any one give me the code?
thanks
|
|
|
|
|
Hai all,
I want to use Microsoft.VisualBasic.Devices in my page.But i am getting only Microsoft.VisualBasic. device is not getting.Shall i need to add any dll for tat?
Plse give me some instruction.
Thanks in advance
Regrds
Lijo Rajan
|
|
|
|
|
Hi from my local host i can able to send mail to my mailid,
So i copy that ddl in to my server and send mail to my mailid using my website,
Its sending only mail its not sending that attachment file,,
Whats the probs i cant find it,
Same time the mail sending only to my gmalid that also sending in spam,
If i send to my yahooid its not sending at all,plz anyone help me of this probs,
This is my code:
'Here saving some datas to my table using stored procedure after that using sub procedure call that mail send
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
If fileUpload.PostedFile.FileName <> "" Then
Dim strInsertproc As String
Dim sqlconn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("connectionString"))
sqlconn.Open()
strInsertproc = "SubmitTravelExpMain '" & txtuserloginempid.Text & "','01/23/2008','" & _
txtuserloginprojectid.Text & "','" & txtDestination.Text & "','" & _
Mid(txtFDate.Text, 4, 3) & Mid(txtFDate.Text, 1, 3) & _
Mid(txtFDate.Text, 7, 4) & "','" & Mid(txtTDate.Text, 4, 3) & _
Mid(txtTDate.Text, 1, 3) & _
Mid(txtTDate.Text, 7, 4) & "','1213','937','" & Val(txttotal.Text) & "','" & Val(txtadv.Text) & "'"
Dim sqlcmd As New SqlCommand(strInsertproc, sqlconn)
sqlcmd.ExecuteNonQuery()
mailsend()
sqlcmd.Dispose()
sqlconn.Dispose()
lblmessage.Text = "Your Expense Statement Has Been Uploaded Successfully..."
binddata()
Else
lblmessage.Text = "Plz Attach A File..."
End If
End Sub
Sub mailsend()
Dim objMail As New MailMessage
Dim objAttach As MailAttachment
Dim objConn As SmtpMail
Dim postedFile = fileUpload.PostedFile
Try
strPath = Path.GetFullPath(postedFile.FileName)
Catch
End Try
strdate = CDate(lbldate.Text)
If Mid(strdate, 2, 1) = "/" Then strdate = "0" & strdate
If Mid(strdate, 5, 1) = "/" Then strdate = Left(strdate, 3) & "0" & Mid(strdate, 4, 6)
strdate = Mid(strdate, 4, 3) & Mid(strdate, 1, 3) & Mid(strdate, 7, 4)
objMail.From = "info@bumigrp.com"
objMail.To = "mageshkumarh@gmail.com"
objMail.Bcc = "mageshmca10@yahoo.com"
objMail.Subject = "Travel Expense Statement of " & txtuserloginempname.Text & "(" & txtuserloginprojectname.Text & ")"
objMail.Body = "Date : " & strdate & " Time - " & hh & " : " & mm & vbCrLf & "Place : " & txtuserloginprojectname.Text & vbCrLf & "Dear Sir," & _
vbCrLf & txtDestination.Text & vbCrLf & " Kind Attention - Plz refer my travel expense details." & vbCrLf & "Regards" & vbCrLf & txtuserloginempname.Text
objMail.Priority = MailPriority.Normal
Try
objAttach = New MailAttachment(strPath)
objMail.Attachments.Add(objAttach)
Catch
End Try
objConn.Send(objMail)
End Sub
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
Public Function SendMail(ByVal FromEmailID As String, ByVal FromName As String, ByVal ToEmailID As String, ByVal ToName As String, ByVal Subject As String, ByVal Body As String, Optional ByVal IsHtml As Boolean = False, Optional ByVal OutMsg As String = "Mail has sent successfully") As String
Try
Dim message As Mail.MailMessage = New Mail.MailMessage()
message.From = New MailAddress(FromEmailID, FromName)
' To address collection of MailAddress
message.To.Add(New MailAddress(ToEmailID, ToName))
message.Subject = Subject
' CC and BCC optional
' MailAddressCollection class is used to send the email to various users
' You can specify Address as new MailAddress("admin1@yoursite.com")
' message.CC.Add("admin1@yoursite.com")
' message.CC.Add("admin2@yoursite.com")
' You can specify Address directly as string
' message.Bcc.Add(New MailAddress("admin3@yoursite.com"))
' message.Bcc.Add(New MailAddress("admin4@yoursite.com"))
'Body can be Html or text format
'Specify true if it is html message
message.IsBodyHtml = IsHtml
' Message body content
message.Body = Body
' Send SMTP mail
Dim mailClient As System.Net.Mail.SmtpClient
mailClient = New System.Net.Mail.SmtpClient("smtp.gmail.com")
'This object stores the authentication values
Dim basicAuthenticationInfo As New System.Net.NetworkCredential("useremailID", "user password") ' replace ur email id and password of your email id
'Put your own, or your ISPs, mail server name onthis next line
mailClient.Host = "smtp.gmail.com"
mailClient.UseDefaultCredentials = False
mailClient.Credentials = basicAuthenticationInfo
mailClient.EnableSsl = "1"
mailClient.Send(message)
SendMail = OutMsg
Return SendMail
Catch ex As Exception
SendMail = ex.Message
Return SendMail
End Try
End Function
This is haneef.............................................................
|
|
|
|
|
Hi Mr.Haneef,
Thanks for ur reply,
I dont know whats the diff b/w ur code and my code...,
I said i can able to send mail,
but its not attaching the file,
Plz reply regarding that
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
|
I have a HTML FileInput control to choose an image. Now I want to choose some particular image file from that control and after that one another button will upload the image to ~\images\ folder in my server as thumbnail as well as general image. How....
Please help me.....
Thanks in advance
Tapas
|
|
|
|
|
Resize image ? Try Image.GetThumbNail() . It will give you good results if your image having embedded thumbnail. If not use Bitmap and Graphics classes to draw an image at your size.
|
|
|
|
|
First you have to upload the file as it through HtmlInputFile. Then you can chose to validate its type, get its thumbnail image, resize it.
I have also shared a few tips on image validation and format conversion over here:
http://www.dotnetspider.com/kb/Article3446.aspx[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
GetThumbnail will work perfectly with images which have thumbnails embedded. But I always prefer to use Graphics and Bitmap classes as it gives full handle to resize the image.
|
|
|
|
|
Hai,
What are the benefits of using IEnumerator over other Loops??
Thanks in Advance,
Sunil Nair
|
|
|
|
|
Suryanairg wrote: What are the benefits of using IEnumerator over other Loops??
It provides way to iterate through the collection using a foreach.
|
|
|
|
|