|
OK, I see what you are saying. Does this mean that what I want to do is not really possible in the way I want to do it?
|
|
|
|
|
Hi
How to extract text from already existing captcha image.I have some captcha images(jpg format) with me,from that images i have to read the letters one by one and convert them as a string.
|
|
|
|
|
Generally speaking the point of captcha images is that its hard to do this. I would have to ask what it is you need it for.
|
|
|
|
|
From my point of view not possible ........
Easily you can't get text from image
Might be there are third party tools available check for that option
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
I been thorugh many website to search "Forum Web Application"(that has thread for new msg.),but i didnt find about it..
my question is what is the best to use data control or web control
When Im using Visual Web developer2005 to develop a "Forum" application....
thanks for your answer....
|
|
|
|
|
blitz2bleach wrote: my question is what is the best to use data control or web control
All server controls that you use when you are developing a web application are web controls.
Most web controls support data binding in one form or another. If you choose to use the controls this way depends on if it suits what you want to accomplish.
---
single minded; short sighted; long gone;
|
|
|
|
|
The Formview option allows you to edit a row in a table, add a new row in a table, and delete a row in a table. How do you set up a formview where only the edit and new functions are enable but a user cannot delete a record?
Ty
|
|
|
|
|
What is the point of using data sources such as SqlDataSource or ObjectDataSource?
Consider a simple example of a web page with a dropdown list used to filter the content of a pageable, sortable GridView. Each control needs a data source and that results in two calls to SQL Server. We are also told to keep the number of "round trips" to SQL Server to a minimum, for best performance. These scenarios are incompatible (although the difference in my example is trivial).
The only solution I have spotted is to make a single call to a compound SQL Server stored procedure and to put the results in a dataset (a repeater cannot be used for a pageable, sortable GridView) and bind each control to the appropriate table in the dataset. The disadvantage to this method is that I now have to code the GridView Sorting and PageIndexChanging events rather than just supplying attributes for that control.
Dave
|
|
|
|
|
The objectDataSource is a very tool. It allows you to bind collection of objects to a gridview instead of always using a dataset or a datatable, dataview. I wrote and article on the objectdatasource and the gridview. Take a look at it and let me know what you think?
http://www.codeproject.com/useritems/GridViewObjectDataSource.asp[^]
I am currently using something close to what I showed in this article in production now. The objects and the gridview it self are a lot more complex, but the basic function is the same.
Ben
|
|
|
|
|
Hi All,
My window has two frames.In the right frame i have a dynamically created table. But when i move the vertical scoll bar between the two frames, i want the table in the right frame to get resized as per the frame size.
Please help.
Thanks & Regards,
Jeeva
|
|
|
|
|
specify the width attribute of ur table as 100%.
think this will solve ur problem......
mareers
|
|
|
|
|
I m using SQL Server 2005 & creating Reports using SQL Reporting.
I have one main report and one sub report.
I have called the sub report as hyperlink on one of the field from main report.
When i run the main report, i get the view properly.
But when i click on hyperlink from main report, that time i supposed to view the sub report
And i m using the input parameters to that sub reports.
But dont have any idea that how i can pass the parameters from main report dataset to sub report report dataset , in runtime !
please guide me for this..
Prakash Sawant
|
|
|
|
|
Hi everyone,
I'm using smilies in a datagrid so that when a user selects one smiley it is installed into sqlserver how could i go about this? The smiley is an ImageButton.
Thanks
|
|
|
|
|
hai all,
I would like to extract a web page and save that into a text file
format.. Can anyone help me with some ideas or sample codes..... thanks...
with Regards,
Imthiyas Ahamed.A
|
|
|
|
|
Use HttpRequest and response object
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(URL);
HttpWebResponse response = (HttpWebResponse)myHttpWebRequest.GetResponse();
resStream = response.GetResponseStream();
re = new StreamReader(resStream);
Store the streamreader as you want you can also set cookies and Proxy in this aproach i think this might helpfull
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
The problem is that I want to bind a data grid or a repeater in a background thread coz the binding process is a time consuming task that might slow down the response. I already binded the grid in the background thread but the problem is to update the UI from that thread.
|
|
|
|
|
hello to all,
i m working on a project which have functionality of chat room. If any new user comes then the new user must show on the page on client side which is already opened , without any post back. so please tell me how to send messages/alerts from server to client side.
with regards ,
sachin jangir
|
|
|
|
|
a) you can't do this directly, once connection is closed there is no way for the server to connect to the client.
b) you can use an HTTP streaming technique where the connection is never closed and the server flushes javascript down it (look it up on ajaxpatterns.org)
c) use an Ajax request at regular time intervals to check for recent activity
d) please don't ask for code its too complicated
|
|
|
|
|
Hi,
I am using ASP.NET 2005. In my project I am using CrystalReport which cotains 50 columns. At the runtime it binds as per the query.
Suppose, as per the query there are 5 columns so it binds with 5 columns. If it gets 20 columns then it binds with 20 columns, like that, but at the time of printing(by using the print button of the CrystalReportViewer ToolBar) it prints upto the length of CrystalReportViewer ToolBar showing on the Browser.
Also there is a problem it shows all the columns binds at runtime in IE, not in Mozila/Netscape. In mozila/Netscape it shows only upto the length of the CrystalReportViewer ToolBar.
Please help.
Thanks & regards
|
|
|
|
|
I want to have a File uploader inside a grid view control. I have bound this grid view to a datasource, so can I use the file uploader inside the gridview? I will have to writer manual coding to upload the file, isn't it?
can somebody tell me how I can sent the filename of the uploaded file to the datasource parameter??
thanks for any answer!!!
|
|
|
|
|
You can put a file uploader in a gridview control, you just need to use a Item Template for the column you want it to be in.
Here is some sample code from Microsoft help:
Visual Basic
Protected Sub Page_Load(ByVal sender As Object,
ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack Then
Dim path As String = Server.MapPath("~/UploadedImages/")
Dim fileOK As Boolean = False
If FileUpload1.HasFile Then
Dim fileExtension As String
fileExtension = System.IO.Path. _
GetExtension(FileUpload1.FileName).ToLower()
Dim allowedExtensions As String() = _
{".jpg", ".jpeg", ".png", ".gif"}
For i As Integer = 0 To allowedExtensions.Length - 1
If fileExtension = allowedExtensions(i) Then
fileOK = True
End If
Next
If fileOK Then
Try
FileUpload1.PostedFile.SaveAs(path & _
FileUpload1.FileName)
Label1.Text = "File uploaded!"
Catch ex As Exception
Label1.Text = "File could not be uploaded."
End Try
Else
Label1.Text = "Cannot accept files of this type."
End If
End If
End If
End Sub
Hope that helps.
Ben
C#
protected void Page_Load(object sender, EventArgs e)
{
if(IsPostBack)
{
Boolean fileOK = false;
String path = Server.MapPath("~/UploadedImages/");
if (FileUpload1.HasFile)
{
String fileExtension =
System.IO.Path.GetExtension(FileUpload1.FileName).ToLower();
String[] allowedExtensions =
{".gif", ".png", ".jpeg", ".jpg"};
for (int i = 0; i < allowedExtensions.Length; i++)
{
if (fileExtension == allowedExtensions[i])
{
fileOK = true;
}
}
}
if (fileOK)
{
try
{
FileUpload1.PostedFile.SaveAs(path
+ FileUpload1.FileName);
Label1.Text = "File uploaded!";
}
catch (Exception ex)
{
Label1.Text = "File could not be uploaded.";
}
}
else
{
Label1.Text = "Cannot accept files of this type.";
}
}
}
|
|
|
|
|
Hi dears,
each user in my website can upload her photo into a directory named 'UserAvatar' . when a user wants to delete her photo an error occured with this message : access to the path c:\domains\mywebsite\UserAvatar\1.jpg is denied.
to fix this problem I got Write access role to ASPNET user for UserAvatar directory. the code is :
<br />
System.IO.DirectoryInfo dInfo = new DirectoryInfo(path);<br />
System.Security.AccessControl.DirectorySecurity dSecurity = dInfo.GetAccessControl();<br />
dSecurity.AddAccessRule(new System.Security.AccessControl.FileSystemAccessRule("ASPNET",System.Security.AccessControl.FileSystemRights.Write,System.Security.AccessControl.AccessControlType.Allow));<br />
dInfo.SetAccessControl(dSecurity);<br />
but the error was not fixed.
What should I do ???
thx,
www.behzadi.net
|
|
|
|
|
Unless your ASPNET user has the appropriate access, you probably won't be able to set this programatically (and if they do have access, then you won't need to...)
Also, and i could be wrong about this, but will they not need modify rights to delete something?
|
|
|
|
|
How can I know that I have permission to set this programmatically or not ? and you are right about appropriate access for ASPNET user , I checkd that the user ASPNET has fullcontrol access on UserAvatar directory ,but why this error occures in deleting files ?
www.behzadi.net
|
|
|
|
|
Hi All,
I Created a Registration Page with only username,Pwd,Email,Contactno and Address fields.
1.when a Enter user with different Email then it is saved the details in Database.
2.My Code is working fine when a Enter username with Already Existing mail id then it is not taking.But only problem is msg is not displaying client side.
How to display msg .Pls find my code also.
procedure
---------
CREATE Procedure SP_Login
(
@Username varchar(50),
@pwd varchar(50),
@Email varchar(50),
@ContactNo varchar(50),
@Address varchar(50),
@Ret_val Int = Null Out,
@Ret_msg Varchar(75) = Null Out
)
AS
IF EXISTS(SELECT * FROM Login WHERE Email=@Email)
BEGIN
RAISERROR('The email address already exists', 16, 1)
END
ELSE
BEGIN
INSERT INTO Login (Username,pwd,Email,ContactNo,Address)VALUES(@Username,@pwd,@Email,@ContactNo,@Address)
END
If @@Error = 0
BEGIN
SET @RET_VAL = 1
SET @RET_MSG = 'DETAILS INSERTED SUCCESSFULLY.'
END
ELSE
BEGIN
SET @RET_VAL = 0
SET @RET_MSG = 'ERROR : Error in Inserting Details.'
END
GO
codebehind
----------
Try
conObj = New SqlConnection("Data Source=B4B-2F-323-CK26;user id=sa;password=sa;Database=TEST")
conObj.Open()
tranObj = conObj.BeginTransaction
cmdObj = conObj.CreateCommand
cmdObj.Transaction = tranObj
With cmdObj
.CommandText = "SP_Login"
.CommandType = CommandType.StoredProcedure
End With
With cmdObj.Parameters
.Add(New SqlParameter("@UserName", SqlDbType.VarChar, 50)).Value = txtUserName.Text
.Add(New SqlParameter("@pwd", SqlDbType.VarChar, 50)).Value = txtPwd.Text
.Add(New SqlParameter("@ContactNo", SqlDbType.VarChar, 50)).Value = txtPhoneno.Text
.Add(New SqlParameter("@Email", SqlDbType.VarChar, 50)).Value = txtEmail.Text
.Add(New SqlParameter("@Address", SqlDbType.VarChar, 50)).Value = txtAddress.Text
retvalp = .Add("@RET_VAL", SqlDbType.Int)
retvalp.Direction = ParameterDirection.Output
retmsgp = .Add("@RET_MSG", SqlDbType.VarChar, 50)
retmsgp.Direction = ParameterDirection.Output
End With
cmdObj.ExecuteNonQuery()
If retvalp.Value = 1 Then
tranObj.Commit()
lblmsg.Text = retmsgp.Value
Else
tranObj.Rollback()
lblmsg.Text = retmsgp.Value
End If
Catch ex As Exception
Response.Write(ex.ToString())
Finally
If Not tranObj Is Nothing Then tranObj.Dispose()
conObj.Close()
cmdObj.Dispose()
End Try
|
|
|
|