
legendgod
Avatar/Signature-
Posts
53 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by legendgod
-
I found the solution! Just need to add a cancel event to stop the update event. Then the data will be updated as the code telling.
-
Because I have customerize my DetailsView control by "edit template", I need to convert the field (it is seven checkboxlists) to a string value. So I write up some a function to handle ItemUpdating event: Sub DetailsViewUpdateing(ByVal sender As Object, ByVal Args As DetailsViewUpdateEventArgs) Handles DetailsView1.ItemUpdating Dim abc As DetailsView abc = sender HiddenScheduleStringA.Value = Convert24ChkBoxToString(abc.FindControl("ChkBoxListSchedule1"), abc.FindControl("ChkBoxListSchedule2"), abc.FindControl("ChkBoxListSchedule3"), abc.FindControl("ChkBoxListSchedule4"), abc.FindControl("ChkBoxListSchedule5"), abc.FindControl("ChkBoxListSchedule6"), abc.FindControl("ChkBoxListSchedule7")) Dim sName, sSchedule, sID, sNote As New Parameter sID.Name = "sID" sName.Name = "sName" sSchedule.Name = "sSchedule" sNote.Name = "sNote" sID.DefaultValue = Args.Keys("sID") sName.DefaultValue = CStr(Args.NewValues("sName")) sNote.DefaultValue = CStr(Args.NewValues("sNote")) sSchedule.DefaultValue = HiddenScheduleStringA.Value sourceShift.UpdateParameters("sSchedule") = sSchedule sourceShift.UpdateParameters("sName") = sName sourceShift.UpdateParameters("sID") = sID sourceShift.UpdateParameters("sNote") = sNote sourceShift.Update() End Sub I traced the flow with Debug tool. I found the Database do updated at the END of this function! However, it turn back to old value at the DetailsView databinding event..... What should I do? What am I missed? Please give me some idea. Thanks!
-
Hello Extremers, Long time not come back to this forum since I quit my last programmer job :( Hope the rule have not changed. :) I have a function GetChkBoxList() which return a checkboxlist class with value according to the input. Function GetChkBoxList(ByVal input as string) as CheckboxList .... .... Return outputChkBoxList End Function I want my Viewgrid control can run GetChkBoxList at runtime. Therefore Viewgrid can show up a list of checkbox according to one of the field's value. But I am not sure how the syntax work. Did any one here can share me some idea? Thank you very much!
-
I have tried to replace the skmmenu with the menu from http://www.pronetcomponents.com and the pop-up menu behaviour in Dreamweaver. However, they are not suitable since both of the pop-up menu script will become disappear (or unactive) after every postback. Do anyone have idea except skmmenu, any good component can overcome this problem? Thank you for your share.
-
Dear all, I am now working on a web application which contain a pop-up menu as headbar and a "dynamic content table" as content. The headbar is in fact a user control. It contain a skmmenu (which is downloaded from http://www.skmmenu.com) and several button control and dropdownlist control. The "dynamic content table" is in fact a htmltable control. It is created out based on the data of a dataview. By making some process from users (like selecting on checkbox and button click), the dataview will be modified hence the table will be reconstructure dynamicly. The process is: 1. Generate a htmltable from dataview 2. User modify 3. By a handler of button click, dataview was modified. Then a Table.Rows.Clear() will be called. 4. Repeat step 1. The web application runs smooth when 2 parts are seperated. It runs ok when both occur in the same webform too. However, once 1-3 change is made on "dynamic content table", then move the mouse on the skmmenu, IE error occur.... After some tests, I found that error mostly occur in "mshtml.dll", which is told by the IE error catalog. And also, ntdll.dll is common too. Something else (by the way, they are all dll files) will also be the reason. When come to IE error, it is completely out of my scope of knowledge. Please give me some idea. How to solve it out? If I must kill either "skmmenu" or "dynamic content table", which one should I kill is better in order to prevent same problem occur again? Thank you very much!
-
Hi everyone, I am now working on a ASP.NET project. I want to add a header and footer on every page. The header contain a pop up menu and the footer have a company logo on it. I have searched through the web I found some tutorial teaching how to create web template with ascx and VS.NEt. However, without experience of VS.NET (and I don't have it) but only Dreamweaver, I don't know how to make it. So I am now using the method { Server.execute("header.aspx") } to let my header.aspx and footed.aspx come into everypage's Page_Load & Page_UnLoad. However, with this method, every page generated have 3 pair of <head></head>, <html></html> and <script runat="server"></script>. Also , the pop-up menu do not work after post-back. (It is created using Dreamweaver's behavour. It worked out by some Javascript Programs) Without VS.NET, I think I have missed some thing I should know. Please give me some idea. thank you.
-
I have tried google but I find only version in VB6 or VB.net. I wanna use a multi-column control in my aspx page. Can someone gave me some idea? Thank you. :)
-
Hello Xtremers, I am now working out a ASP.NET web pages. The 1st page will pop-up a small operation window, let the users type in something, and return to the opener window after a button clicked. In order in pass some parameters, I am using button.CommandName & button.Id to contain some value. However, I find there are not enough of parameter holders. Could you please give me some idea, except Session, cookie, application. Any parameter holders for this situation? Thank you very much.
-
I never know it is SO simple! Thank you for your nice tutorial!
-
Hello Etremers, I am using ASP.NET and created a page which display a table width 1800px. It is so wide that IE cannot print it out probably (it simply ignore the right hand side of table). Therefore I want to try if .NET framework support some method allow me to create an excel file from the table. Therefore client can use IE to open it. save it and print it out. Have anyone tried this before? Can you give me some suggestion? Thank you.
-
i see... First of all, thank you for your reply. Let me tell more details ... In fact the function I mentioned is the scheduling management function. All the manager of different teams can only access their teams' schedule. Some of manager can access to more than 1 team and some of teams have more than 1 manager (from 1-5). I don't want the managers access and update the schedule at the same time because they may not get the latest version if someone is editing. I want to try Arch4ngel's idea but I have no idea how to count the access time of users...
-
Hello everyone. I have a problem in writing a function of web service. In the web service, there is a function which available to one user only at one time. Therefore, I write some code in global.ascx like: Application.Add(("SchHHGInUse"& Dt.Rows(i).Item("hhgId")),-1) whenever the first user use the function, it change the value in application to his userId. Therefore any other user can see the change and do not allowed to use the function. When the first user click "QUIT" button or "LOGOUT", the value in application will change back to -1. Therefore the next users can use the function now. However, since most users seems not likely to obey the rule. Which just click X button at the windows right top end. Will cause the function be locked from any other users.... My problem is, since the user information is stored in his own session. At the time the session timeout, the server cannot unlock the value of Application too! (because server do not know whether the current user of function is timeouted or not) I am quite a newbie to this type of web service. Please give me any idea you have. It will be helpful! Thank you!
-
VB.NET+Accses - selecting only the Date
legendgod replied to dizzy_boy's topic in Database / XML / Reporting
Dt.ToString("dd.MM.yyyy") sth like that =) -
Hello everyone. I am now working on a project which including 3 databases server (A,B,C) in 3 locations. In order to share the workload, I want all the user reach the webpage in A. Then after users login, A judge which user group the loginer belong to. After then loginer will be redirected to A,B or C. After that, all the application & access of database will be done at static server. My problem is that how can the session be passed from server A to target database server? So that the user need not be login again?
-
However since it is a edit/update/cancel datagrid, the dropdownlist will be generated only in runtime. How to apply Javascript? May I ask another question here: how to call a Javascript function in aspx function? And vice versa? Thank you.
-
Dear Xtremers, I have 4 dropdownlist controls which let users to select the task Starttime and endtime: There is a datagrid which have 2 controls in each of the editItemtemplate. They are (in editItemTemplate A:) StartTimeHrDDL, StartTimeMinDDL & (in editItemTemplate B:) EndTimeHrDDL, EndTimeMinDDL. And because these controls are created in runtime. I place the validator control in the end of editItemTemplate B too. I found no problem when compare EndTimeHrDDL with StartTimeHrDDL (I want to make sure EndTime should not be lesser then StartTime). However, I want to perform the same validation to the StartTimeMinDDL & EndTimeMinDDL ONLY if StartTimeHrDDL = EndTimeHrDDL. Because I cannot write a if..else statement in the runtime (if it is possible, please teach me!), I try to call a function like <%# GetResult() %> to get the result of the validation between StartTimeHrDDL & EndTimeHrDDL but fail. Could anyone give me some idea? Thanks
-
I have a javascript which pop-up a box when mouseover a specific object. The pop-up box will show up the text(or string) pass in. Since Javascript treat ('), (") and (\) as special character. Therefore I use following: strNote = Replace(DV(i).Item("schNote"), "\", "\\") to fix up the string before pass in to the Javascript function. The pop-up box show properly. However, the strNote = Replace(DV(i).Item("schNote"), "\", "\\") cannot handle ("). How should I modify it to make it right? Many thanks.
-
Dear Xtremers, I have some information which record the total working time for labours in a month. The value is given by the difference between StartTime & EndTime. Also, the value need to be sum up in the end of month. The duration of emporary leave will be deducted from the sum, too. I am using MS SQL Server for the project. Do you think datetime will be nice for that? Or an integer represent the minutes accumulated would be better? Thank you for your advice.
-
I am now working on a project which create a web service. I found that many function is duplicate on several pages. And when the function need to be modified, I have to check out all the pages. Sometimes, I want to call page2's functionB in functionA in page1. But it is difficult when the pages are individuals. I have learnd C++ when I was schooling and learnd some of the O-O concept (e.g. public,private,protected). However, since I don't get a proper lesson on .NET and I don't have VS.NET right now (I am using dreamweaver + WebMatrix), it is quite difficult for a newbie like me to figure out how to do it. I wanna search on Google but I don't know what's this tactic named....Can anyone please show me some reference? Any idea with be helpful. Thank you very much.
-
Because I am using traditional Chinese Framework it gives non-English error message. 'ScheduleAddItem' is my stored procedure. The translation could be ..... : row 1: statement around 'ScheduleAddItem' incorrect. Expection detail: System.Data.SqlClient.SqlException: Row 1: statement around 'ScheduleAddItem' incorrect. source code error: Row 72: ' ")" Row 73: Row 74: DBCommand.ExecuteNonQuery Row 75: 'DBConnection.Close() Row 76: Conn.Close()
-
I want to insert a new record to a table, the table have 8 columns. The Primary Key "schId" which is an auto-increment number is ignored. Therefore I created the follow stored procedure: CREATE PROCEDURE [dbo].[scheduleAddItem] @startDT smalldatetime, @endDT smalldatetime, @Note varchar, @sAlias varchar, @hName varchar, @cName varchar AS INSERT INTO Schedule (schStartTime, schEndTime, schNote, sId, hId, cId, schPending) VALUES (@startDT, @endDT, @Note, @sAlias, @hName, @cName, 5) GO In my aspx page I typed the following: ' startDT & endDT are datetime variable, NoteTextBox is a textbox control, the else are string variable DBCommand.Parameters.Add(New SqlParameter("@startDT",SqlDbType.smalldatetime, startDT)) DBCommand.Parameters.Add(New SqlParameter("@endDT",SqlDbType.smalldatetime, endDT)) DBCommand.Parameters.Add(New SqlParameter("@Note", SqlDbType.varchar, Replace(NoteTextBox.Text, "'", "''"))) DBCommand.Parameters.Add(New SqlParameter("@sAlias",SqlDbType.varchar, sAliasDropList.SelectedValue)) DBCommand.Parameters.Add(New SqlParameter("@hName",SqlDbType.varchar, hNameDropList.SelectedValue)) DBCommand.Parameters.Add(New SqlParameter("@cName",SqlDbType.varchar, cNameDropList.SelectedValue)) However, when I run the aspx, the dotNet framework return a error said the stored procedure contain error. Which part I am wrong with? Am I wrong in ignore to input the Primary key value?Any idea is helpful. Thank you.
-
I don't know ShowModalDialog/ShowModelessDialog. But anyway, I have used several Javascript function to make it out. Thank you for your help!