on hyperlink click it redirects the user to Another Page
alaminfad
Posts
-
GridView is Caching does not Update -
GridView is Caching does not UpdateHello Experts I've this Gridview of tasks a Hyperlink TemplateField that takes the user to another page where he can accept/reject[buttons] the very task , on clicking accept/reject[buttons] the page redirect the user again to the tasks Gridview , unfortunately , the same task is still there unless if the user manually Press F5[Refresh] I tried the following nothing worked :( 1- EnableViewState ="false" 2- In the ObjectDataSource , EnableCaching ="false" 3-i tried to use Ajax but it gives me a whole lots of errors from the webconfig ,my website is working ,I can’t stop users from accessing my site in order to wrestle with Ajax what else that I can do? One more question Experts, the approach I am taking on developing my site is to work in my local machine when I am finished with my changes I literally Copy/Paste the new aspx/aspx.vb overwriting the old file with the new one , this approach is working fine but it causes the server to a bit slow esp. in the first time after change, is there a more Professional way? Thanks in advance
-
a Problem Reporting with Word DocumentHELLO All Recently i found this article about reporting with word document ,when i used the sample code it's working fine ,but rather plain , what if i want spice my report , i have an already designed word reports ,they are simple forms , when i saved them as XML i got this lengthy xml file ,now of course i have some blank cells , in the reports that i want to fill since the report is basically a table , here comes the headache ,HOW TO GET TO THE PARTICULAR NODE? i have solved this problem in a hard way i wonder if there is a better way DOES ANY1 KNOW AN EASIER WAY TO GET TO THE NODES AND OVERWRITE THEM? ANY GOOD ARTICLE ABOUT THIS TOPIC THANX IN ADVANCE by the way here is the hard solution of mine ,i first read copy xml file into .txt file then read it and indexof() the cell to know where is it exactly i want to insert my data the code would like like this fp = File.OpenText("C:\Documents and Settings\Administrator.RFF-SRV0\Desktop\" & "NoteVactionXML.txt") _ManipulationStr = fp.ReadToEnd() Dim str, resl As String resl = _ManipulationStr Dim index As Integer = 0 str = "" _ & "" _ & "" _ & "" _ & "" _ & "" _ & "" & "خن" & "" _ & "" resl = resl.Insert(548 + 10566, str) fp.Close() strHTMLContent.Append(resl) HttpContext.Current.Response.Write(strHTMLContent) HttpContext.Current.Response.End() HttpContext.Current.Response.Flush() Do i have to do the above for each item? I HOPE NOT
-
How to Trace variables ? [modified]Hello every1 im have a RUNNIG website on a REMOTE SEREVER sometimes i get bad results ,i want to trace my Variables to know thier values at a particular point, here is a list of things i've tried : 1. Response.write() ----not working 2. Trace ="True" ---not working properly i cant show actual values ,especially outside the page for instance in a user control or Class.vb 3.Remote debugging -----the remote site doesnt even open i get this error message The Web server does not appear to have FrontPage Server Extensions ... when i tried configuering the IIS in order to add frontpage 2002 , the wizard asked me for Windows Server 2003, i don have any Is there a way out? Please Please Please Help?
modified on Saturday, December 5, 2009 12:40 AM
-
BC30201: Expression expected. [modified]i tried but i got: BC30451: Name 'IFF' is not declared. i tried : Checked="<%# IF((Container.Value = "True"), true, false)%>" /> i got the old error : BC30201: Expression expected.
-
BC30201: Expression expected. [modified]Thnx Sir,i tried but i got: BC30451: Name 'IFF' is not declared. i tried : Checked="<%# IF((Container.Value = "True"), true, false)%>" /> i got the old error : BC30201: Expression expected.
-
BC30201: Expression expected. [modified]I guess you are right ,cuz when i removed the[evaluation] the page loaded succesfuly , now do i have to give up the whole idea of changing the DB instantly via some JavaScript code?
-
BC30201: Expression expected. [modified]Actually i do have VB.net code behind ,but for the purpose of instant DB updating i've used JAVASCRIPT the sript is below, hope that would clarify function updateSent(bSent, iRowIndex) { var oRecord = new Object(); oRecord.OrderID = grid1.Rows[iRowIndex].Cells[0].Value; oRecord.ShipName = grid1.Rows[iRowIndex].Cells[1].Value; oRecord.ShipCity = grid1.Rows[iRowIndex].Cells[2].Value; oRecord.ShipPostalCode = grid1.Rows[iRowIndex].Cells[3].Value; oRecord.ShipCountry = grid1.Rows[iRowIndex].Cells[4].Value; oRecord.Sent = bSent; grid1.executeUpdate(oRecord); }
-
BC30201: Expression expected. [modified]thnx for yr swift response, but it doesnt work
-
BC30201: Expression expected. [modified]Hello All I've a grid with multiple columns ,one of them is a boolean column,i want to represent it as a chackbox , when the checkbox checked or unckecked i want the database to change automatically , i get this error before the page even loaded ,here is the Source Error: ------------------------------------------------------------------- Line 38: Line 39: Line 42: ------------------------------------------------------------------------ Microsoft (R) Visual Basic Compiler version 8.0.50727.42 for Microsoft (R) .NET Framework version 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. C:\CRFF\Default.aspx.vb(79) : warning BC42104: Variable 'wks' is used before it has been assigned a value. A null reference exception could result at runtime. If Not (wks Is Nothing) Then ~~~ C:\CRFF\Default2.aspx(49) : warning BC42020: Variable declaration without an 'As' clause; type of Object assumed. Dim s = r("employeeid").ToString ~ C:\CRFF\IT_Daily_Tasks.aspx(40) : error BC30201: Expression expected. target.SetDataBoundString(1, System.Convert.ToString(Container.Value == "True" ? "checked='checked'" : "", System.Globalization.CultureInfo.CurrentCulture)) ~ C:\CRFF\IT_Daily_Tasks.aspx(40) : error BC30035: Syntax error. target.SetDataBoundString(1, System.Convert.ToString(Container.Value == "True" ? "checked='checked'" : "", System.Globalization.CultureInfo.CurrentCulture)) ---------------------------------------------------------------------------- Help Please
modified on Wednesday, December 2, 2009 12:10 AM
-
Obout grid with Row Template failed to saveHi All I’ve used Obout grid with Row Template,It displays the data from the database fine, when I click edit the edit template appears when I make some changes and click save this error appears *********************************************************************** Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation *********************************************************************** This property helped me stopping that message from appearing again <pages enableEventValidation="false" > But then the changes are not reflected to DB ,when I debugged the following code I found out that the Event [e] which was supposed to hold the new(changed) data is holding the old data why? How to fix that? :----------------------------------------------------------------------- Sub UpdateRecord(ByVal sender As Object, ByVal e As Obout.Grid.GridRecordEventArgs) Dim myConn As SqlConnection = New SqlConnection("Data Source=GP10;Initial Catalog=Integration;Integrated Security=True") myConn.Open() Dim m = e.Record("EmployeeID") Dim mm = e.Record("EmployeeNameA") Dim myComm As SqlCommand = New SqlCommand("UPDATE Employees SET APUsername=@APUsername, AccountNumber = @AccountNumber, EmployeeNameA=@EmployeeNameA, HasPC=@HasPC, Manager = @Manager WHERE EmployeeID = @EmployeeID", myConn) myComm.Parameters.Add("@APUsername", System.Data.SqlDbType.VarChar).Value = e.Record("APUsername") myComm.Parameters.Add("@AccountNumber", System.Data.SqlDbType.VarChar).Value = e.Record("AccountNumber") myComm.Parameters.Add("@EmployeeNameA", System.Data.SqlDbType.NVarChar).Value = e.Record("EmployeeNameA") myComm.Parameters.Add("@HasPC", System.Data.SqlDbType.Bit).Value = e.Record("HasPC") myComm.Parameters.Add("@Manager", System.Data.SqlDbType.VarChar).Value = e.Record("Manager") myComm.Parameters.Add("@EmployeeID", System.Data.SqlDbType.NVarChar).Value = e.Record("EmployeeID") myComm.ExecuteNonQuery() myComm.Dispose() myConn.Cl
-
Grid Delete is not working(DeleteCommandType="StoredProcedure") plz Help?thnx for replyin , Actaully i did'nt write that code it was auto generated by the grid when i configured the datasource :)
-
Grid Delete is not working(DeleteCommandType="StoredProcedure") plz Help?i got SP that is working fine ,i checked it in the SQL serever ,but it is not working with the Grid ,i tried changing the parameter name but it didnt work , here is the ASP code -------------------------------------------------------------------------- <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:APServerConnectionString1 %>" DeleteCommand="Multiple_Delete" SelectCommand="SELECT PROC_INST_ID, PROC_INST_NAME, DEF_NAME FROM WF_PROC_INSTS" DeleteCommandType="StoredProcedure"> <DeleteParameters> <asp:Parameter Name="_PROC_INST_ID" /> </DeleteParameters> </asp:SqlDataSource> ----------------------------------------------------------------------- is there anything wrong here? ThnX
-
Texbox is not Clear On PostbackUnfortunately it did'nt work ,i do want this every time the page is posted back , i mean when the user select from the DDL the textbox1 should be empty for him(user) to notice and select a date from the Obout calender image , i tried it both ways(if and if not is post back) it didnt work , i found this property Clear() on the Obout tutorials : ************************************************** If you need to clear the current selected date simply call the method Clear. Example: <obout:Calendar runat="server" id="myCal"> </obout:Calendar> <a onclick="myCal.Clear();"> Clear </a> *********************************************** by the way ive two page loads one page_load in the user control where the DDl and obout Calender and of course its Textbox which we want to clear Second page_load in the actual default page so ive tried to use that property in both page_loads it didnt work ,i have follwed the debugger it going in the right way , here is the code ----------------------------- Dim script As New StringBuilder ' Dim reader As StreamReader = File.OpenText(Server.MapPath(includeFilePath)) If Not Page.ClientScript.IsClientScriptBlockRegistered("MySript") Then 'script.Append(reader.ReadToEnd.Replace("{title}", Me.Title).Replace("{buttonLabel}", Me.ButtonLabel)) ' delay alert 1 ms to handle postback script.Append("<script language='javascript'>document.dfghsdfggetElementByID('Calendar1').Clear();</script>") Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "MySript", script.ToString) End If -------------------------------------------------------------------- one more thing the server doesnt seem to validate what inside the script even if write Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "MySript","Nothing") what is a problem? + how to fix it?
-
Texbox is not Clear On PostbackIve an Obout calender that i change its datemin , datemax according to Dropdownlist selected item, i want the textbox (that the calender copy its value to ) to be clear(empty) when the DDL changes for the user to select a new date ,DDl is AutoPostback true ,ive tried this in the [ddlVacationTypes_SelectedIndexChanged]: TextBox1.Text = "" 'Didnt work the textbox is holding the last value i also tried this in the [Page_Load]: Page.RegisterClientScriptBlock("MyScript", _ "<script language=javascript>" & _ " document.getElementByID('TextBox1').value = '' ; </script>") 'Didnt work the textbox is holding the last value what am i doing wrong? + How to fix this? thXs
-
How to set a range to a Calender? Solved [modified]Thank you for replying yes It is a website , Abhishek Sur has replied with a very good solution ,check it out thx again :)
-
How to set a range to a Calender? Solved [modified]:thumbsup: Obout tools are awesome ,it opened a whole new world for me i really don know how to thank you ,Thank you veeeeeeeeeeeery muuuuuuuuuuuuuuuch :thumbsup:
-
How to set a range to a Calender? Solved [modified]Hello all , i've a calender that i want the user to navigate through a particular period of time ,for instance he has to apply for a vacation 3 days in advance ,and can only apply for a vacation in this year , so the calender range should be from NOW +3 days to NOW + an year this is the code and the calender doesnt comply to it why? how to fix it? Protected Sub ddlVacationTypes_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlVacationTypes.SelectedIndexChanged Dim startDate As DateTime = Convert.ToDateTime(Now.ToShortDateString) Select Case ddlVacationTypes.SelectedIndex Case 0, 2, 3 startDate = startDate.AddMonths(1) Case 1 startDate = startDate.AddDays(3) End Select Dim endDate As DateTime = startDate.AddYears(1) Dim dateSpan As TimeSpan = endDate.Date - startDate.Date Calendar1.SelectedDates.Clear() Dim i As Integer = 0 For i = 1 To dateSpan.Days Calendar1.SelectedDates.Add(startDate.AddDays(i)) Next End Sub
modified on Monday, November 9, 2009 2:23 AM
-
How to cutomise a Usercontrol Solved [modified]Thank you sir , but i was thinking of having a sub that handles all the control intead of exposing each individual item , i vame up with this sub , and it works just fine Public Sub _DisableCont(ByVal Cont_Str As String) Dim _Control As Control For Each _Control In Me.Controls Dim _ControlToString As String = _Control.ToString If _ControlToString = Cont_Str Then _Control.Visible = False End If Next End Sub :)
-
How to cutomise a Usercontrol Solved [modified]Hello All i've a usercontrol with alot of items i want to customize it for each individual page ,for instance making some textboxes,buttons invisible in a particular page , how to? thanks
modified on Sunday, November 8, 2009 1:39 AM