|
If you don't have access to the SQL server, ask your database administrator. You can use SQLDMO or the SQL Server Enterprise Manager (whatever it is called today)
|
|
|
|
|
hello everybody:
i am new to VB.net I have to design a custom web server control which validates itself on client side and server-side. which means that i would not use a seperate custom validator for validation, but it should be a part of the custom control itself.and this validation would be done on clientside first, and incase javascript is off in browser then validation is done on server side.
The description of the custom control is as follows:
its a date control which has 3 dropdowns(dds).one for month, second for days and third for days.it has two properties isDOB(boolean) and getDate which returns the date in the format mm/dd/yyyy.
one method setDate which takes the string inn the format mm/dd/yyyy.This will set date according to the input string.
can somebody point me to the rite direction.any help would be deeply appreciated.
Thanks
Cheers!
AB
|
|
|
|
|
Sounds like you want to create a custom control with the controls that are supplied with ASP.NET. Among these controls will be your validation controls that can create validation code on both the client and server. There is a lot of information on the web that demonstrates how to do this via http://www.google.com/microsoft[^]
|
|
|
|
|
Thanks for reply.
I think u got it rite.
but the question is how can use the validation controls as part of my custom sever control.i can write a seperate custom validator for my date control. but that won't serve my purpose.
basically my date control would be self validating(on client and server side) control. now how can i use a custom validator inside my date control.i dont know. mostly on the web i m finding seperate validators. there is very less info about self validating controls. if u come acoss some thing like this. please do let me know.
Thanks.
Ab
|
|
|
|
|
On the client-side, Microsoft uses javacript to handle validation. I believe you can call this code via yourown injected javascript. On the server-side, it is a little easier. I believe you can validate your control via code and set a property (the name eludes me for now) to indicate the success of the validation.
This might get you started:
http://www.15seconds.com/issue/020319.htm[^]
|
|
|
|
|
Is it possible to post a set of variables to a web page and display the result in the browser? I have managed to post the variables but cannot figure out what to do with the result to display it in the browser, any information gratefully received!
|
|
|
|
|
You have to process the posted data server-side.
|
|
|
|
|
Thanks, I realise that, but the question is how do I post the data to the page and display the results? I can post using an URLConnection but cannot see how to display the result in the browser.
|
|
|
|
|
I don't know much about Java but I believe you have to process the Posted data via a JSP file that outputs to a HTML table for example.
-- modified at 19:10 Monday 20th February, 2006
|
|
|
|
|
I have found a way to do it now, it may not not be the best way but it works. I send the variables to a ASP page which writes them to a file, the Java applet then redirects to a page which displays the contents of the file.
|
|
|
|
|
Hi,
I have a global.js file that gets included in every page. In it I have a statement that reads as follows:
window.defaultStatus = "blah blah blah";
This works well in Internet Explorer, but it does not display in the status bar in Mozilla. Can anyone tell me why, and how to solve the problem?
Regards,
ma se
|
|
|
|
|
Each browser has a sightly different Document Object Model (DOM). You have to test to find out what browser is being used by the client, and, then, have your code perform according to this information. You need to look at the Mozilla DOM documentation to determine how it is done on that particular browser.
|
|
|
|
|
|
My site contains free softwares developed by me. I want to record how many users have downloaded my each program.
I only want to work in html & jscript (if you give me code of it, i don't know jscript).
Now i plan this approach:
>>First user select my program.
>>On program's detail page there is a link to download this software.
>>When user clicks this link, a new webpage with SiteCounter on it, opens for 5 seconds and automatically starts downloading file. (Like on almost every downloads site, e.g. www.downloads.com).
Please tell me how to build this page. I have the source code of my sitecounter. Rest is what I wanted.
Thanx
|
|
|
|
|
Hi,
Did you use database, if no then why dont you use file concept (create a new txt file add a text 0, and save it in root directory, open a file while download read and increment the count for every download ).
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
I have sitecounter which will do it for me.
But the real problem is that how to make this intermediate page which will start downloading my .exe file after 5 seconds. If you know the answer, please tell me the source code. (If I know jscript, then I'll do it, but I don't know jscript.)
|
|
|
|
|
Hello Forum:
this is a calendar web application that displays all events from a database oracle, depending on the department and date.
data is currently retrived and display propertly in a table as a list. example
Name: event title
date: event date
department: department name
description: description of the event
if more than one event it will display in consecutive order by date.
Name: event title
date: event date
department: department name
description: description of the event
Name: event title
date: event date
department: department name
description: description of the event
Problem:
I have to display these events in a calendar grid, each individual event inside its corresponding box(date) for corresponding month.
Alxtech
|
|
|
|
|
I have added a button on my web page which onClick call javascript "window.print".it will print the page.fine.But i want to print the page in lanscape not in portrait.what should i do.i also tried
@page {set:lanscape}
But the page is not printing in landscape.
Can any body solve my problem??
Thanx
|
|
|
|
|
You have not specified the media for the style. Try this:
@page {set:lanscape}
Don't worry, be happy )
|
|
|
|
|
I also tried this but problem could not solved.
@page {set:lanscape}
|
|
|
|
|
A friend has asked me to help with a business idea to sell files over the internet (like the mp3 download sites). Obviously they could just email the files on payment received but I would like to find a better solution.
I just don't know where to begin, can anyone point me in the right direction?
Should I try to find a application someone has already written which can be adapted?
Any thoughts would be really usefull.
Thanks,
Ali
|
|
|
|
|
Try Share-it.
http://www.shareit.com
|
|
|
|
|
Hello helpfull web guru who will hopefull know what is wrong!
I have a web app, that builds a graph according to survey data entered over several pages. The answers to these questions are saved to an SQL database. After the last question is answered, the page calls the following class:
Imports System.drawing<br />
Imports System.io<br />
<br />
Public Class StarMaker<br />
<br />
Private picbox As New System.Windows.Forms.PictureBox<br />
<br />
Private ax1pt As Point = New Point(181, 193)<br />
Private ax2pt As Point = New Point(181, 193)<br />
Private ax3pt As Point = New Point(181, 193)<br />
Private ax4pt As Point = New Point(181, 193)<br />
Private ax5pt As Point = New Point(181, 193)<br />
Private ax6pt As Point = New Point(181, 193)<br />
Private ax7pt As Point = New Point(181, 193)<br />
<br />
Private ratio1 As Double<br />
Private ratio2 As Double<br />
Private ratio3 As Double<br />
Private ratio4 As Double<br />
Private ratio5 As Double<br />
Private ratio6 As Double<br />
Private ratio7 As Double<br />
<br />
Private p_maxVal As Double<br />
Private p_ax1 As Double<br />
Private p_ax2 As Double<br />
Private p_ax3 As Double<br />
Private p_ax4 As Double<br />
Private p_ax5 As Double<br />
Private p_ax6 As Double<br />
Private p_ax7 As Double<br />
<br />
Private p_FileLoc As String<br />
Private p_FileName As String<br />
<br />
Public Property FileName() As String<br />
Get<br />
FileName = p_FileName & ".jpg"<br />
End Get<br />
Set(ByVal value As String)<br />
p_FileName = value<br />
End Set<br />
End Property<br />
<br />
Private Function colorCreator(ByVal h As String) As Color<br />
If Mid(h, 1, 1) = "#" Then<br />
Dim c As New ColorConverter<br />
colorCreator = c.ConvertFromString(h)<br />
Else<br />
colorCreator = System.Drawing.Color.FromName(h)<br />
End If<br />
End Function<br />
<br />
Public Sub DumpImage()<br />
picbox.BackgroundImage = Drawing.Image.FromFile(System.Configuration.ConfigurationManager.AppSettings("TenantBackgroundImageLoc"))<br />
Dim gfx As Graphics = Graphics.FromImage(picbox.BackgroundImage)<br />
<br />
Dim col As Color = colorCreator("#AB0534")<br />
Dim pen As Pen = New Pen(col, 3)<br />
<br />
gfx.DrawLine(pen, ax1pt, ax2pt)<br />
gfx.DrawLine(pen, ax2pt, ax3pt)<br />
gfx.DrawLine(pen, ax3pt, ax4pt)<br />
gfx.DrawLine(pen, ax4pt, ax5pt)<br />
gfx.DrawLine(pen, ax5pt, ax6pt)<br />
gfx.DrawLine(pen, ax6pt, ax7pt)<br />
gfx.DrawLine(pen, ax7pt, ax1pt)<br />
<br />
gfx.Flush()<br />
<br />
picbox.Image = New Bitmap(400, 400, gfx)<br />
<br />
picbox.Refresh()<br />
<br />
<br />
p_FileName = System.Guid.NewGuid.ToString<br />
<br />
Do Until File.Exists(p_FileLoc & "\" & p_FileName & ".jpg") = False<br />
p_FileName = System.Guid.NewGuid.ToString<br />
Loop<br />
<br />
Dim img As Bitmap = picbox.BackgroundImage<br />
Dim ms As New MemoryStream()<br />
img.Save(ms, Imaging.ImageFormat.Jpeg)<br />
Dim imgData(ms.Length - 1) As Byte<br />
ms.Position = 0<br />
ms.Read(imgData, 0, ms.Length)<br />
Dim fs As New FileStream(p_FileLoc & p_FileName & ".jpg", FileMode.Create, FileAccess.Write)<br />
fs.Write(imgData, 0, UBound(imgData))<br />
<br />
fs.Close()<br />
fs.Dispose()<br />
<br />
ms.Close()<br />
ms.Dispose()<br />
<br />
img.Dispose()<br />
<br />
picbox.Dispose()<br />
<br />
pen.Dispose()<br />
<br />
gfx.Dispose()<br />
End Sub<br />
<br />
Public Sub New(ByVal FileLoc As String, ByVal maxval As Double, ByVal ax1 As Double, ByVal ax2 As Double, ByVal ax3 As Double, ByVal ax4 As Double, ByVal ax5 As Double, ByVal ax6 As Double, ByVal ax7 As Double)<br />
p_FileLoc = FileLoc<br />
p_maxVal = maxval<br />
<br />
p_ax1 = ax1<br />
ratio1 = p_ax1 / p_maxVal<br />
ax1pt.X = 181 + (0 * ratio1)<br />
ax1pt.Y = 193 - (143 * ratio1)<br />
<br />
p_ax2 = ax2<br />
ratio2 = p_ax2 / p_maxVal<br />
ax2pt.X = 181 + (112 * ratio2)<br />
ax2pt.Y = 193 - (89 * ratio2)<br />
<br />
p_ax3 = ax3<br />
ratio3 = p_ax3 / p_maxVal<br />
ax3pt.X = 181 + (139 * ratio3)<br />
ax3pt.Y = 193 + (32 * ratio3)<br />
<br />
p_ax4 = ax4<br />
ratio4 = p_ax4 / p_maxVal<br />
ax4pt.X = 181 + (62 * ratio4)<br />
ax4pt.Y = 193 + (128 * ratio4)<br />
<br />
p_ax5 = ax5<br />
ratio5 = p_ax5 / p_maxVal<br />
ax5pt.X = 181 - (63 * ratio5)<br />
ax5pt.Y = 193 + (128 * ratio5)<br />
<br />
p_ax6 = ax6<br />
ratio6 = p_ax6 / p_maxVal<br />
ax6pt.X = 181 - (140 * ratio6)<br />
ax6pt.Y = 193 + (32 * ratio6)<br />
<br />
p_ax7 = ax7<br />
ratio7 = p_ax7 / p_maxVal<br />
ax7pt.X = 181 - (113 * ratio7)<br />
ax7pt.Y = 193 - (89 * ratio7)<br />
<br />
DumpImage()<br />
End Sub<br />
End Class
Which should draw the image, and save it to the HDD, and return the calling page with a GUID filename.
My problem occurs if two users are doing the test simultaneously. The class keeps drawing the first image over and over, completely ignoring any new parameters passed into the constructor?
Please help me if you know what I am doing wrong? The code below is the calling code on the page:
Private Sub DisplaySpider()<br />
Dim Ws As New IntranetWS.DataReader<br />
<br />
Dim PercArr(7) As Integer<br />
Dim x As Integer<br />
Dim Perc1 As Integer<br />
Dim Perc2 As Integer<br />
Dim Perc3 As Integer<br />
Dim ErStr As String = ""<br />
For x = 1 To 7<br />
Dim PercDs As DataSet = Ws.Pillar_Perc_Read(ConfigurationManager.AppSettings("ApplicationKey"), x, Session("LanguageId"), ErStr) ' Retrieve scores dataset from the database<br />
If Not PercDs Is Nothing Then 'Build up values to pass to graphing class<br />
<br />
Perc1 = PercDs.Tables(0).Rows(0)("AnswerFlag")<br />
Perc2 = PercDs.Tables(0).Rows(1)("AnswerFlag")<br />
Perc3 = PercDs.Tables(0).Rows(2)("AnswerFlag")<br />
PercArr(x) = Perc1 + Perc2 + Perc3<br />
Else<br />
If ErStr = "" Then<br />
ErStr = "Error Saving Data, please try again"<br />
End If<br />
Master.DisplayError(ErStr)<br />
Exit Sub<br />
End If<br />
Next x<br />
<br />
Dim star As New StarMaker.StarMaker(ConfigurationManager.AppSettings("StarFolder"), 15, PercArr(1), PercArr(2), PercArr(3), PercArr(4), PercArr(5), PercArr(6), PercArr(7)) ' create instance of graphing class, passing in parameters for plotting<br />
<br />
Dim filename As String = star.FileName ' get GUID filename<br />
If Not Ws.BrandToolPicture_Save(ConfigurationManager.AppSettings("ApplicationKey"), Session("UserId"), filename, ErStr) Then ' Save filname agains userID in the database<br />
If ErStr = "" Then<br />
ErStr = "Unknown error saving BrandToolPicture."<br />
End If<br />
Master.DisplayError(ErStr)<br />
Exit Sub<br />
End If<br />
Response.Redirect("BrandToolImage.aspx") 'Open Report which displays image & scores<br />
<br />
End Sub
Thanks
Michael - The guy breaking out in a cold sweat.
|
|
|
|
|
All my dear friends
Im a new programmer. I have finished a webbase ASP.Net+C# project. I want to publish it on my LAN(2 windowXP PCs linked togeter with a roster). I can use IE to browse my webbase application pages on the computer that I used to developed the project.(I open IE, input the address "http://localhost/VParking/Main.aspx") It works for the computer.
But how can use IE to browse the project from another computer?
I tried to shared my Inetpub floder. and open the IE from another computer and input address "\\MING\Philip's (C)\Intpub\VParking\Main.aspx". but it doesnt work in this way.
Would anybody give me hit to solve my problem?
Thank you very much
|
|
|
|
|
Try http://MING/VParking/Main.aspx and, if it can't resolve that hostname, then try http://<IP Address of MING>/VParking/Main.aspx .
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|