My database has lots of german data stored. While I read it and display in the gridview, everthing works fine. The Grdview displays the german characters perfectly in the browser.
After the display phase, I read a data from the gridview cells as gridview1.rows.cells.text, it returns special characters. For eg, 1st row, 2nd column in gridview has ä which is displayed in the browser properly, when I read the same from codebehind, it shows ä
How to set it right? any help is deeply appreciated.
I have 3 submit buttons on a single page. Each submit button is linked to its controls via a "ValidationGroup". One of the groups even has a Custom Validator. The problem I am having is that the validation is not even firing. I have no idea why. I hope the answer is not silly
Here is the HTML for ONE of the groups:
<div id="dvRegistrationValidation" runat="server">
<asp:RequiredFieldValidator ID="rfvRegistrationCode" ControlToValidate="txtRegistrationCode"
Display="None" ValidationGroup="RegistrationProcess" ErrorMessage="Registration Code"
<asp:CustomValidator ID="cstTarget" runat="server" ErrorMessage="Either Head Office or Farm Site/Unit"
<asp:ValidationSummary ID="vsRegistration" runat="server" DisplayMode="BulletList"
ShowSummary="true" HeaderText="The following fields are mandatory:" ValidationGroup="RegistrationProcess" />
And here is the OnServerValidate Sub Routine:
Sub cstTarget_ServerValidate(ByVal source As Object, ByVal e As ServerValidateEventArgs) Handles cstTarget.ServerValidate
If Me.chkTarget1.Checked = True And Me.chkTarget2.Checked = True Then
e.IsValid = False
ElseIf Me.chkTarget1.Checked = False And Me.chkTarget2.Checked = False Then
e.IsValid = False
ElseIf Me.chkTarget1.Checked = True And Me.chkTarget2.Checked = False Then
e.IsValid = True
ElseIf Me.chkTarget1.Checked = False And Me.chkTarget2.Checked = True Then
e.IsValid = True
i have two images imgnew and imagold when i click on browse button i will upload the image and put in imgnew image and the previous image will be in imgold image control it is going fine but when iam closing the application .then again old images are there swap images are not present
can you correct my code where iam going wrong .which helps me
i am new to asp.net i have created on small web project with one datagrid on page and when i drag and drop sql data adapter on page it shows error "Generated SELECT Statment"
and then i have managed to solve this issue but now it showing
"Generated CANCEL Statment"
"Generated UPDATE Statment"
"Generated DELETE Statment"
so i dont know what to do now so I have tried to run the project but it also showing error
Server Error in '/WebApplication3' Application.
Login failed for user 'MACHINE NAME\ASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for use MACHINE NAME\ASPNET'.
Line 59: 'Put user code to initialize the page here
Line 60: If Not Page.IsPostBack Then
Line 61: SqlDataAdapter1.Fill(DataSet11)
Line 62: DataBind()
Is this your database? Have you installed it? If not you should the ask the system administrator or whoever created this database to add you (or your aspnet user to the database.
Have you ever connected succesfully to this database? Can you for example use SQL Administrator to browse data?
thanks for your prompt response
currently i have one small assignment to create web project with one page so it should display author table from pubs database into datagrid thats all
so what i have done drag and drop sql data adapter on the web page and went through wizard to complite but at the end of wizard it shows generated error for update, delete and cancle so i dont know what to do with this and when i try to run the project it shows loging error
but if i right click on sql data adapter and select priview data it shows all the data
waiting for your kind help
have a nice time
Last Visit: 31-Dec-99 18:00 Last Update: 19-Jun-21 9:11