|
Have you check this?[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Checking it now and luks amazing...thnx
|
|
|
|
|
No problem.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Hi all,
Im using login control in asp.net.I dont know how to code the event for remember me check box which would maintain the session in the particular pc. Give me any idea please.
|
|
|
|
|
Check this result.[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Use RememberMeCookie cookie to have this functionality implemented.
Do some Google on this
In case you need further help let me know.
|
|
|
|
|
Hi everybody,
I'm having a little trouble over here in project land. I had a system fall into my lap that was written in 1.1 with a page that uses a stock DataGrid.
This DataGrid holds (shockingly...) data from our database and facilitates CRUD functionality. However, in the past, the customer was using "magic-push-button-processing" and we are now needing to process all changes in a batch (i.e. single transaction)
Long story short: For batch visualization, we are marking each of the rows of the grid that have changed with a separate background color and disabling the DataGrid's editColumn button for that particular row only. Problem is, I'm looking all over for an event on that grid that processes on the server after the cells have been filled but no luck(long shot, as the cellText is HTML, but figured it was worth a try)
I went this route because I was having trouble tying into the CSOM, but now that approach needs more attention.
Private Sub grid_ItemDataBound(ByVal sender as object, Byval e as System.Web.UI.WebControls.DataGridItemEventArgs) handles grid.ItemDataBound
Dim itemType as ListItemType = e.Item.ItemType
If ((itemType.Equals(ListItemType.Header)) Or (itemType.Equals(ListItemType.Footer)) Or (itemType.Equals(ListItemType.Pager)) Then
Return
End If
e.Item.Attributes("onload") = "loadGrid();"
End Sub
and inside "GridBehavior.js", I have
function loadGrid()
{
var x = 1;
}
I'm just trying to get the breakpoint in the js to be hit, but whenever I had this code tied in, the grid disappears on page refresh. Any ideas as to why?
"I need build Skynet. Plz send code"
modified on Friday, August 7, 2009 10:53 AM
|
|
|
|
|
Alaric_ wrote: I'm just trying to get the breakpoint in the js to be hit
I think you need to debug your JS. Please try out the following (by unchecking in the Internet Explorer) -
Internet Options-> Advanced -> Accessibility -> Disable script debugging (Internet Exploer)
Let me know if you need any further detials.
|
|
|
|
|
"Disable Script Debugging" was already unselected...always has been
"I need build Skynet. Plz send code"
|
|
|
|
|
My question wasn't "How do I debug javascript" What I was saying is that I have a breakpoint set in my js file and I have the function tied into the onLoad client side event of each DataGridItem and the breakpoint is never being hit. When I include the attribute assignment of
e.Item.Attributes("onload") = "loadGrid()"
located within my ItemDataBound handler of the grid, the grid does not render on a page refresh. Furthermore, "loadGrid()" is not being called because my breakpoint is not being hit.
Let me pose this question a different way: Can anyone provide an example of how to tie into a .NET 1.1 DataGrid's client-side "onLoad" event?
"I need build Skynet. Plz send code"
|
|
|
|
|
Hmm..A bit doubtful on this..I would suggest you to take some other approach..
I think you can extend the Datgrid with some Client-side Behaviors[^].
|
|
|
|
|
That is not an option as this is not an "exercise" but a real-world project with constraints that the control used to display data on the page not be replaced
"I need build Skynet. Plz send code"
|
|
|
|
|
Hello All,
I'm currently working with the AnimationExtender and it's all going well up until the point where I have my content inside a asp Panel. Inside the panel (which is the part that gets animated) I have link buttons which run a method in the C# code behind file. Everytime it runs the command and causes the postback (everything is inside an update panel) the Animation gets reset. I understand that when I cause the post back the Panel picks up it's original style coding and so I have tried to make a HiddenField that the method sets to tell the Page_Load to change the style of the Panel to how it would look after the animation would have run.
This is not working though, for some reason the method sets the HiddenField but then after the postback occurs the HiddenField reverts back to its original value and therefore doesn't get picked up in my Page_Load.
Are there any solutions to keeping an animation up and persist through a postback while the content it contains runs methods.
Thanks very much
Jason
|
|
|
|
|
Here is the code..i want to delete records if date exceeds by 10 compairing with current date...for this i have made two connection strings but one for select and other one for delete...it's running all well only the cnc1 which has to delete is not deleting from db....whats wrong with that line?
<-----------code in page load------------------->&
<br />
OleDbConnection cnc = new OleDbConnection((string)Session["cs"]);<br />
cnc.Open();<br />
string qc = "select Date1 from friends where Username='" + (string)Session["uname"] + "' and Confirm='No'";<br />
OleDbCommand cmdc = new OleDbCommand(qc, cnc);<br />
OleDbDataReader drc = cmdc.ExecuteReader();<br />
while(drc.Read())<br />
{<br />
DateTime dtc = Convert.ToDateTime(drc[0].ToString());<br />
<br />
string da1 = DateTime.Now.ToShortDateString();<br />
DateTime date1 = Convert.ToDateTime(da1);<br />
string dttc = Convert.ToString(dtc);<br />
<br />
TimeSpan ko = date1.Subtract(dtc);<br />
int day = ko.Days;<br />
<br />
<br />
<br />
if(day>=10)<br />
{<br />
<br />
OleDbConnection cnc1 = new OleDbConnection((string)Session["cs"]);<br />
cnc1.open()<br />
string qc1 = "Delete from friends where Username='" + (string)Session["uname"] + "' and confirm='yes' and Date1='" + dttc + "'";<br />
OleDbCommand cmdc1 = new OleDbCommand(qc1, cnc1);<br />
cmdc1.ExecuteNonQuery();<br />
cnc1.Close();<br />
}<br />
<br />
<br />
<br />
}<br />
<br />
cnc.Close();
|
|
|
|
|
Try using the same connection object for both calls (use just cnc rather than also creating cnc1 .
But that said, know that an Access database is a terrible choice as a back-end platform for web applications. It was never intended to be a multi-user platform and is very limited as far as simultaneous connections/queries.
If cost is an issue, you may want to consider SQL Server Express, or MySQL.
|
|
|
|
|
Sql doesnt work on ma system..so im left with no choice just access..
|
|
|
|
|
greendragons wrote: Sql doesnt work on ma system
And why doesn't it work on your system?
Using Access for a web application backend is absolutely the wrong thing to do. Perhaps the only exception I could make to this is if the database and web application were packaged as a demo or tutorial with the intent of running on a single machine with a single user (like for learning purposes), and not deployed to a multi-user environment.
But if your intent is to deploy a functioning application that will be used by more than one person, solving the problem of why something like Sql Express or MySQL "doesnt work on ma system" needs to be the first step you take before going any further with your development. If it isn't, you are setting yourself up for serious problems down the road.
Feel free to post why you think you couldn't get a multi-user relational database engine running in your environment and I'll suggest help where I can.
|
|
|
|
|
Yeah ur right....before when i use to run sql xpress or my sql my windows exlporer used to crash...then i went deeper changed few setting it partially started working but still have some issues...like from where i run sql...i have 2005 installed on ma vista...it only shows 2 options configuration manager and surface manager...from where i create db and tables?? And about sqlxpress inbuilt with vs it shows me login failed even i have windows authentication....how i run mysql from configuration manager??
|
|
|
|
|
I donot think it's a good design/approach you are following. You could have populated the friends in a DataTable. Then loop through each friend and verify your condition.
Let me know if you need any furhter details.
|
|
|
|
|
Sql doesnt work on my system..the condition i am trying to apply is that if somebody sends a friend reques and its not approved then in friend table the status is set to no..and if request get 10days oldr then it should be deleted so that user can again send friend request..please tell me whats wrong with my designing approach and what about my problem how i delete it..
|
|
|
|
|
First point, you are using a datareader which should be used for reading the data in forward only manner.
Second point, data reader is always connected mode and you are deleting from the same table at the same time increasing the complexity unneccessaruiy.
Anyway, properly you can do the same thing.
Have a single connection. Using the same select command populate a DataSet. In that DataTable, loop through each row (each row is a friend) and fire the delete the command (here also you can use the same connection).
Keep me posted if you need any help.
|
|
|
|
|
I have never seen a code like this. NO NO NO NO NO No NO.
how can you declare two Connection String
How can you close the connection before you do the Delete
You Delete Statement is incorrect, before you put anything to C# make sure that you have tested it on the SQL side, that is why i prefare to use SP's than naked sql in C#, let SQL handle SQl and C# Handle C#
It seems you dont know where what should go, this is Wrong.
You need to Buy a Book and Read a little bit.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Ohh cnc.close() is @ last..that one is copying mistake nevrmind..but its not working..
|
|
|
|
|
What do you mean ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I mean to say that it's actually cnc1.open() not close that was mistake during i was copying the code..i have corrected but isnt there anyway to access db using two connectiong strings as i did to select and then delete..?
|
|
|
|