|
as i am displaying all catories in same datagrid i need to take all columns. I only want to hide it if its empty
Prakash Mishra(Banglore,India)
|
|
|
|
|
Implement following logic:
dgrd.Columns(i).Visible = False
Note: i represents column index
Regards,
Vipul Mehta
Sr. Software Engineer
Accenture Services Pvt Ltd
|
|
|
|
|
Thanks
Actually now how i solved is i took three data grid and made it visible according to my need, any way ur solution is smarter.
Thanks a lot
Prakash Mishra(Banglore,India)
|
|
|
|
|
Ur solution will work fine but this will make ur page quite bulky & also will increase the redundancy of ur logic.
From maintainance perspective ur solution might proved to be bit dicy.
Regards,
Vipul Mehta
Sr. Software Engineer
Accenture Services Pvt Ltd
|
|
|
|
|
Hey peeps,
I have a site running .net 2.0. The site is hosted on a server farm.
On the guestbook page i seem to get attacked by a bot trying to post some nasty urls. But the bot don't succed, it gets a "Validation of viewstate MAC failed" error. I catch all errors in the global file and log it. Therefor i can see this happens quite often, more than 20 times a day.
I have posted a trace file where the exception happens here.
The header of the guestbook files is as followed.
<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/Default.master"
AutoEventWireup="true" CodeFile="Guestbook.aspx.cs" Inherits="Guestbook" Title="Untitled Page" Culture="da-DK"%>
I have been forced to turn Validaterequest off, to allow users to html format their posts in the guestbook.
Does anybody have an idea to how i can prevent this error from happening.
-Anders
|
|
|
|
|
Check this[^] for the error information.
dm52j wrote: i seem to get attacked by a bot trying to post some nasty urls. But the bot don't succed,
Why don't you block such kind of bots with CAPTCHA ?
|
|
|
|
|
Already have blocked, with CAPTHA. But this error appears anyhow
|
|
|
|
|
It looks like it might be a cross page posting error - someone is trying to post to your page and it can't handle it.
Google a bit on cross page posting for advice.
|
|
|
|
|
Sounds like this could be my problem, i will try google it some more and see if i can come up with a solution myself. But if anybody should have one at hand, i would greatly appreciate it.
Tanks you Paddy, for the help so far.
-Anders
|
|
|
|
|
HI all,
I am an asp.net (C#) programmer. and I want to build a cms tool for my client to manage their site.
can you guys recommend a good cms tool for me.
thanks.
|
|
|
|
|
|
|
select wef,weeklyoff,empTimePoliciesId from emptimepolicies where wef >= #2\1\2006# and employeeid=928
is there any problem in the above query?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Yeah, the #'s don't look right to me. What makes you ask ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
i think u should try to compile u'r query in query analizer.. and look the output
Sonia Gupta wrote: wef >= #2\1\2006# and employeeid=928
i dont know what kind datatype u use for wef and employeeid?
Regards,
Tomi
|
|
|
|
|
Thanks Few minutes ago christian pointed out a very silly mistake.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sonia Gupta wrote: #2\1\2006#
That is a date literal used by the MS Access database. If you are using any other database, it's apostrophes around the date instead.
Also, the database might not recognice that exact date format. You should use a parameterised query, so that you don't have to format the date as a string.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have a site and I want to perform a simple check on each page that session exists.
The exact check on each page will be as below:
If session doesn't exist for the user redirect it to login page
Do I need to write the code on each .cs file or is there a better way to perfome this operation.
Please suggest!
Pavas
|
|
|
|
|
mpavas wrote: Do I need to write the code on each .cs
if u want to do that, its fine..but i think u can make a class for the session check..so, if u want to check the session all you need is call the class function for session check
Kind Regard,
Tomi
|
|
|
|
|
|
Anytime Pavas
Regards,
Tomi
|
|
|
|
|
TomiEdy wrote: so, if u want to check the session all you need is call the class function for session check
Session is not in the context of a class ? So you need to get Page object here to access session. Is it a good practice ?
|
|
|
|
|
Im getting this error "SELECT permission denied on object '_______', database 'name of database', owner 'dbo'." while connecting to database in SQL in asp.net
help
-- modified at 3:50 Tuesday 31st July, 2007
|
|
|
|
|
Sounds like your DB is set up so the user you're logging in as doesn't have permission to do a SELECT.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|