|
Not when i click the back button when i click any menu link also i can easily access the datas without logged in.
|
|
|
|
|
hi,
what are modifications that you are done?
S Kumar
|
|
|
|
|
Hi,
just check the cookie information is either available or not in master page's page load event,if values are nothing just redirect to login page...
S Kumar
|
|
|
|
|
Hi,
In your first page, paste this code in pageload
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
|
|
|
|
|
Sorry to say again it works wrongly.the user can access pages after paster the page in pageload of first page.
|
|
|
|
|
Hi Kumar Sir,
I got it sir.Actually we have to given Formsauthentication.LoginUrl then it cleanely works.
|
|
|
|
|
Thanks for your corordination sir...
|
|
|
|
|
Hi,
I want to export an image field from sql 2005 to excel. This is with vb.net.
Is there anybody who knows if this is possible? And how to do this?
T.
|
|
|
|
|
How is this an asp.net question ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have the Following code that runs inside loops
if (txt != array[p].ToString())
{
cycleGrid.Rows[i].Cells[j].Style.BorderColor = System.Drawing.Color.DarkGray;
cycleGrid.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.DarkGray;
cycleGrid.Rows[i].Cells[j].Style.Cursor = Infragistics.WebUI.Shared.Cursors.Wait;
}
else
{
cycleGrid.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.Black;
cycleGrid.Rows[i].Cells[j].Style.Cursor = Infragistics.WebUI.Shared.Cursors.Auto;
cycleGrid.Rows[i].Cells[j].Style.Font.Bold = true;
}
Now as you can see am disabling cells by turing the color to be gray and by making sure that its not selectable. Now this will work perfectly if the array has a single value in the Array, but when the Value is like this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 18 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
i need to Disable the values that does not appear in the array like the above example 15,16,19 will be missing from the list, so in the grid they should be gray and the other should be bold and black. Mybe there is something wrong here , because it only make the 35 im the list and it made it bold and it made others bold to but they are grey but bold. like this
http://www.vbforums.com/attachment.php?attachmentid=69654&stc=1&d=1236926456[^]
Thank you
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.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
What we're not seeing is the loop that iterates over i and j.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
The Method with loops look like this
protected void setupGrid()
{
if (((int)Session["numCycles"]) > 0)
{
UltraWebGrid cycleGrid = ultraGridCycles;
int numCols = 0;
int numRows = 0;
if (((int)Session["numCycles"]) >= 13)
{
numCols = 13;
}
else
{
numCols = ((int)Session["numCycles"]);
}
if ((((int)Session["numCycles"]) % 13) == 0)
{
numRows = (int)(((int)Session["numCycles"]) / 13);
}
else
{
numRows = (int)((((int)Session["numCycles"]) / 13) + 1);
}
cycleGrid.Height = Unit.Pixel(20 * numRows + 6);
for (int i = 0; i < numCols; i++)
{
UltraGridColumn col = new UltraGridColumn(true);
col.Width = Unit.Pixel(10);
col.Key = i.ToString();
cycleGrid.Columns.Add(col);
}
for (int i = 1; i <= numRows; i++)
{
UltraGridRow row = new UltraGridRow(true);
row.Key = i.ToString();
for (int j = 1; j <= numCols; j++)
{
UltraGridCell cell = new UltraGridCell(true);
cell.Style.HorizontalAlign = HorizontalAlign.Center;
cell.Style.Padding.Left = 0;
cell.Style.Padding.Top = 0;
cell.Style.Padding.Bottom = 0;
cell.Style.Padding.Right = 0;
cell.Value = (int)((13 * (i - 1)) + j);
if (((13 * (i - 1)) + j) > ((int)Session["numCycles"]))
{
cell.Value = null;
cell.Style.BackColor = System.Drawing.Color.Gray;
cell.AllowEditing = AllowEditing.No;
}
row.Cells.Add(cell);
}
cycleGrid.Rows.Add(row);
}
ArrayList array = (ArrayList)Disable_Grid();
int u = cycleGrid.Rows.Count;
for (int i = 0; i < cycleGrid.Rows.Count; i++)
{
UltraGridRow g = cycleGrid.Rows[i];
for (int j = 0; j < g.Cells.Count; j++)
{
for (int p = 0; p < array.Count; p++)
{
string txt = g.Cells[j].Text;
if (txt != array[p].ToString())
{
cycleGrid.Rows[i].Cells[j].Style.BorderColor = System.Drawing.Color.DarkGray;
cycleGrid.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.DarkGray;
cycleGrid.Rows[i].Cells[j].Style.Cursor = Infragistics.WebUI.Shared.Cursors.Wait;
}
else
{
cycleGrid.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.Black;
cycleGrid.Rows[i].Cells[j].Style.Cursor = Infragistics.WebUI.Shared.Cursors.Auto;
cycleGrid.Rows[i].Cells[j].Style.Font.Bold = true;
}
}
}
}
}
}
Thanks
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.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Lot of code here. What happens when you step through it ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Good Morning Chris
Thanks for your help, i have added an extra if statement like this and it worked
protected void setupGrid()
{
if (((int)Session["numCycles"]) > 0)
{
UltraWebGrid cycleGrid = ultraGridCycles;
int numCols = 0;
int numRows = 0;
if (((int)Session["numCycles"]) >= 13)
{
numCols = 13;
}
else
{
numCols = ((int)Session["numCycles"]);
}
if ((((int)Session["numCycles"]) % 13) == 0)
{
numRows = (int)(((int)Session["numCycles"]) / 13);
}
else
{
numRows = (int)((((int)Session["numCycles"]) / 13) + 1);
}
cycleGrid.Height = Unit.Pixel(20 * numRows + 6);
for (int i = 0; i < numCols; i++)
{
UltraGridColumn col = new UltraGridColumn(true);
col.Width = Unit.Pixel(10);
col.Key = i.ToString();
cycleGrid.Columns.Add(col);
}
for (int i = 1; i <= numRows; i++)
{
UltraGridRow row = new UltraGridRow(true);
row.Key = i.ToString();
for (int j = 1; j <= numCols; j++)
{
UltraGridCell cell = new UltraGridCell(true);
cell.Style.HorizontalAlign = HorizontalAlign.Center;
cell.Style.Padding.Left = 0;
cell.Style.Padding.Top = 0;
cell.Style.Padding.Bottom = 0;
cell.Style.Padding.Right = 0;
cell.Value = (int)((13 * (i - 1)) + j);
if (((13 * (i - 1)) + j) > ((int)Session["numCycles"]))
{
cell.Value = null;
cell.Style.BackColor = System.Drawing.Color.Gray;
cell.AllowEditing = AllowEditing.No;
}
row.Cells.Add(cell);
}
cycleGrid.Rows.Add(row);
}
ArrayList array = (ArrayList)Disable_Grid();
int u = cycleGrid.Rows.Count;
for (int i = 0; i < cycleGrid.Rows.Count; i++)
{
UltraGridRow g = cycleGrid.Rows[i];
for (int j = 0; j < g.Cells.Count; j++)
{
for (int p = 0; p < array.Count; p++)
{
string txt = g.Cells[j].Text;
if (txt != array[p].ToString())
{
cycleGrid.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.Gray;
}
else
{
cycleGrid.Rows[i].Cells[j].Style.Cursor = Infragistics.WebUI.Shared.Cursors.Auto;
cycleGrid.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.Black;
cycleGrid.Rows[i].Cells[j].Style.Font.Bold = true;
}
}
if (cycleGrid.Rows[i].Cells[j].Style.Font.Bold == true)
{
cycleGrid.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.Black;
}
else
{
cycleGrid.Rows[i].Cells[j].Style.ForeColor = System.Drawing.Color.Gray;
cycleGrid.Rows[i].Cells[j].Style.BackColor = System.Drawing.Color.DarkGray;
cycleGrid.Rows[i].Cells[j].Style.Cursor = Infragistics.WebUI.Shared.Cursors.Wait;
}
}
}
}
}
And its working thank you
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.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
I have a Web Service that is receiving a file, and putting into a SQL Database. For some reason this method gets an error, while all the others work. Through searching the web all the results say I need to change my IIS setup, which I did not do because it is already setup the way they want.
So, any ideas why I can't call this method:
public void AddSong(string Name, string Artists, string Album, string Genre, int YearPublished, string Path, DateTime DateAdded, byte[] FileData, string MD5)
Without this error:
The request failed with HTTP status 400: Bad Request.
I can post any code you think is relavant, but with my searches it seems like it isn't a code issue. Am I doing something not allowed?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
It can be cause of Access Permission. Seem, the file need to write in your system so its required permission. Did you create Application Pool on IIS. Create New Application Pool, Change the Identity of Application pool to local system, then assign the application pool to that Virtual Directory then Try test. Hope this will resolve your issue.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I am not writing it to the file system, straight to SQL...
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Yeah, tried that just in case, didn't work.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi,
I have a datagrid and i given that inside a .It is now scrollable.But i want the headers static.Where should i give the header.
Code is below
<div style="BORDER-RIGHT: navy 2px solid; PADDING-RIGHT: 1px; BORDER-TOP:
navy 2px solid; PADDING-LEFT: 1px; LEFT: 0px; PADDING-BOTTOM: 1px; OVERFLOW:
auto; BORDER-LEFT: navy 2px solid; WIDTH: 850px; PADDING-TOP: 1px;
BORDER-BOTTOM: navy 2px solid; POSITION: relative; TOP: 10px; HEIGHT: 230px">
<ASP:DATAGRID id="DGInbox" runat="server" Width="100%" BackColor="White" BorderColor="#DEDFDE"
Font-Name="arial" Font-Size="Small" HeaderStyle-BackColor="#ffcc99" DataKeyField="UserName"
OnEditCommand="DGInbox_Edit" OnCancelCommand="DGInbox_Cancel" OnUpdateCommand="DGInbox_Update"
AutoGenerateColumns="False" AllowPaging="True" AllowCustomPaging="False" PageSize="15" GridLines="Both"
PagerStyle-Mode="NumericPages" PagerStyle-HorizontalAlign="Center" PagerStyle-NextPageText="Next"
PagerStyle-PrevPageText="Prev" OnPageIndexChanged="DGInbox_Page" Font-Names="verdana" OnItemDataBound="DGInbox_OnItemDataBound"
AllowSorting="True" OnSortCommand="DGInbox_Sort" BorderWidth="1px" BorderStyle="none" EnableViewState="True"
CellPadding="2" CellSpacing="0">
<FooterStyle BackColor="#CCCC99"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#CE5D5A"></SelectedItemStyle>
<AlternatingItemStyle BackColor="White"></AlternatingItemStyle>
<ItemStyle BorderColor="White" BackColor="#F0F8FF"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#6699cc"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="Result">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<!--<asp:HyperLink id="testresult" Text='<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_RESULT")%>' NavigateUrl='<%# "TestResult.aspx?id=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"UserName").ToString()) + "&QStrTestId=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"TestId").ToString()) + "&QStrResult=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"DB_CANDT_RESULT").ToString()) + "&QStrCandidate=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"CandidateName").ToString())%>' runat="server" Target="_blank" />-->
<a href="#" onclick="oEditorWindow = window.open('<%# "TestResult.aspx?id=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"UserName").ToString()) + "&QStrTestId=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"TestId").ToString()) + "&QStrResult=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"DB_CANDT_RESULT").ToString()) + "&QStrCandidate=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"CandidateName").ToString()) + "&QStrCandidateBatch=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"BatchName").ToString())%>','a','scrollbars=1,resizable=1,width=800,height=400,left=100,top=150,screenX=0,screenY=100');" id="A1"><%# DataBinder.Eval(Container.DataItem, "DB_CANDT_RESULT")%></a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Name" SortExpression="CandidateName">
<HeaderStyle Font-Bold="True" ></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<a href="javascript:void(window.open('CandidatePersonalDetails.aspx?CID=<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>&Type=<%# DataBinder.Eval(Container.DataItem, "CandidateType")%>®Type=<%# DataBinder.Eval(Container.DataItem, "RegistrationType")%>',null,'width=700,height=250,left=150,right=150,top=180,resizable=yes,scrollbars=1'));"><%# DataBinder.Eval(Container.DataItem, "CandidateName")%></a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="RegistrationDate" HeaderText="Reg Date" SortExpression="RegistrationDate" DataFormatString="{0:yyyy-MMM-dd}">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="City" HeaderText="Location" >
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="CandidateType" HeaderText="Type">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="DB_CANDT_SCREENINGSTATUS" HeaderText="OnlineScreening">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Email" HeaderText="e-Mail" SortExpression="Email">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Experience" HeaderText="Exp">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="CurrOrg" HeaderText="CurrOrg">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="AOA" HeaderText="AOA">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="ACT" HeaderText="ACT">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="PhoneNumber" HeaderText="Phone">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="MobileNumber" HeaderText="Mobile">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="DB_CANDT_ADRS" HeaderText="Address">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="DB_CANDT_TSTATUS" HeaderText="Status">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="DB_CANDT_TS_TIME" HeaderText="Start Time">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="DB_CANDT_TE_TIME" HeaderText="End Time">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="DB_CANDT_TTAKEN" HeaderText="Time Taken">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="Re-Schedule">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<a href="Schedule.aspx?id=<%# DataBinder.Eval(Container.DataItem, "DB_CANDTEST_ID")%>&QStringCandtName=<%# DataBinder.Eval(Container.DataItem, "CandidateName")%>&type=<%# DataBinder.Eval(Container.DataItem, "RegistrationType")%>&email=<%# DataBinder.Eval(Container.DataItem, "Email")%>&BNAME=<%# DataBinder.Eval(Container.DataItem, "BatchName")%>&Qlocation=<%=m_LocationSelected%>&Uid=<%# DataBinder.Eval(Container.DataItem, "UserName")%>&pwd=<%# DataBinder.Eval(Container.DataItem, "Password")%>" id="lnkreschedule">Re-Schedule</a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Comments">
<HeaderStyle ></HeaderStyle>
<ItemTemplate>
<a href="javascript:void(window.showModalDialog('HRComments.aspx?CID=<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>&QStringCandtName=<%# DataBinder.Eval(Container.DataItem, "CandidateName")%>',null,'dialogHeight:12em;dialogWidth:15em;status:no;scrolling:no'));">Comments</a>
<!--<a href="#" onclick="ShowDetails();GetCandId('<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>','<%# DataBinder.Eval(Container.DataItem, "CandidateName")%>',popHRComments)">Comments</a>-->
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<HeaderStyle BorderStyle="None" BackColor="White"></HeaderStyle>
<ItemTemplate>
<!--<a href="DeleteUser.aspx?id=" id="lnkDelete" onclick="return ConfirmDeletion();">Delete</a>-->
<a href="DeleteUser.aspx?id=<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>&STATUS=<%=m_StatusSelected%>&QStrLocation=<%=m_LocationSelected%>&QStrCurrPageIndex=<%=CurrPageIndex%>" id="lnkDelete" onclick="return ConfirmDeletion();">Delete</a>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle NextPageText="Next" PrevPageText="Prev" HorizontalAlign="Right" ForeColor="Black"
BackColor="#6699cc" Mode="NumericPages"></PagerStyle>
</ASP:DATAGRID>
</div>
|
|
|
|
|
Please post properly.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hai Abhijith,
I got it,Thanks for the response and sorry for the bad posting
|
|
|
|
|
Hi,
there was no code...what was the problem...?
S Kumar
|
|
|
|
|
Hai Kumar,
Thanks for the response,i got hte solution, sorry for the bad posting
|
|
|
|
|
with out doing any serialization can i use the class created by the xsd in two projects to communicate between two.
|
|
|
|
|
Well, you can, but you need to define how. How do you expect to send a class instance from one project to another ? What sort of projects are they ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|