|
Have you tried Session::Clear() ?
Before .NET 2.0 the way i did things was on page_load check the session for USER_ID or ROLES or whatever you want to call the session variable with your data in. If it was not correct I would use
Response::Redirect(string url, bool stopexecution). If the user was authorised to view this page then I would allow the page to continue loading.
It is handy to make this a class inherited from system.web.ui.form (i think it is this it is deifnately close to this) and then you can inherit the rest of your pages from it so you dont have to write the code every time.
Have a look on MSDN at ASP.NET Sessions and also how ASP.NET loads the pages.
Hope this helps
Dan
|
|
|
|
|
Hi with in two dates..., i want to display sunday dates in one datagrid....,
and other weekdays in another datagrid..........
How to do that.............
Magi
|
|
|
|
|
Hmm assuming the dates store the dates in two seperate arrays or other suitable datasource as you may have them stored in a dataset then have the datasource of one datagrid point to the weekday data and the datasource of the other point to the sunday data.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridclasstopic.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdatagridclassdatasourcetopic.asp
Hope this helps
Dan
|
|
|
|
|
Hello All,
Want to creat a table dynamically in HTML page as
<code>
<table cellpadding="0" cellspacing="0" border="1" width="80%">
<%for(int i=0;i<8;i++){%>
<tr>
<%for (int j = 0;j<8;j++){%>
<td style="width:10%" id='<%=i%>'+'<%=j%>' >Data</td>
<%} %>
</tr>
<%} %>
</table>
</code>
But unfortunately I have been unable to set the ID value of element properly.
I want to give ID value of element as a combination of 'i' and 'j' say 1st row 1st cell as 11, 1st row 2nd cell as 12 ....
Can anyone help me out setting the ID value properly using loop control variable i and j.
Thanks,
Arindam D Tewary
|
|
|
|
|
|
Hi,
Iam creating a stored procedure, in this stored procedure i want a view to be created whenever that store procedure is being executed,
Can i have a view created inside a stored procedure?
Thanks!
Gautham
|
|
|
|
|
Hi Gautham:
I'm not expert on this...but what problem if using CREATE VIEW statement in the store procudure??
<< >>
|
|
|
|
|
Hello friends...
I am using doing textbox validation .After that on ok click of confirm box another cofirm is called and when ok is clicked again..user is redirected to nextpage.All this code is written in javascript..and everything is running fine .but only prob is the page is not redirected to next page. I tried redirection using window.location.href="nextpage.aspx" and location.href="nextpage.aspx"; no success..How is it possible? All controls I have used are html controls.
|
|
|
|
|
hi,
i have three tables like category ,course ,modules.in category the degree are there,like MCA,BE.in coursetable course like electronics computer etc.in module table chapters r there like database,it etc
if i will display the modules table in the datagrid ,above datagrid it should be displayed ,like category,course,module like BE,ECT,POWERELECTRONICS.
how i will get the courseid and categoryid to display.plz help
p.sethi
|
|
|
|
|
Use item DataBound event of datagrid, this is fired before u bind datagrid. Same want to do the same but only I want department name comma separated
eg: HR,SE,QA
|
|
|
|
|
hi all,
i have 2 textboxes(multiline).if i select text in one textbox i have to drag that text and drop in another textbox.
how i have to do it?help me it is urgent
|
|
|
|
|
Hi all,
I developed a application with asp.net 2.0 (vb.net ) and sql server 2000.
My requirement is ... to take input in Arabic Language and store in Sql server, Similary some other pages..... i will retrive that data and show to user.....
Any idea how to take input, display on web and store in database in Arabic Language......
Thanks
Sajjad
|
|
|
|
|
Don't repost.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi All,
I know how to create a parameter field and Formulafield. Please tell me How to use parameter field in my Report. I Created one parameter field with name.A window opened which taking
1.Name 2.Prompting text 3.value type Then I clicked on Ok.
My requirement is I want to display details of particular userdetails from "Emp_info" table.
While i run a aspx page it is not asking any prompt for taking name .So pls tell me how to use parameter field?
Thanks
|
|
|
|
|
TEll me the diff b/w Datagrid,Datalist and Repeater...
With Regards,
Samson
|
|
|
|
|
These three controls share much in common, such as the programmatic syntax used for binding data to the Web control, as well as a number of common properties and events. Despite their similarities, though, each of these Web controls has their individual advantages and disadvantages. In designing data-driven Web applications, ASP.NET developers often find themselves wondering which of these three controls is the "best" one.
1. Datagrid has paging while Datalist doesnt.
2. Datalist has a property called repeat. Direction = vertical/horizontal. (This is of great help in designing layouts). This is not there in Datagrid.
3. A repeater is used when more intimate control over html generation is required.
4. When only checkboxes/radiobuttons are repeatedly served then a checkboxlist or radiobuttonlist are used as they involve fewer overheads than a Datagrid.
The Repeater repeats a chunk of HTML you write, it has the least functionality of the three. DataList is the next step up from a Repeater; accept you have very little control over the HTML that the control renders. DataList is the first of the three controls that allow you Repeat-Columns horizontally or vertically. Finally, the DataGrid is the motherload. However, instead of working on a row-by-row basis, you’re working on a column-by-column basis. DataGrid caters to sorting and has basic paging for your disposal. Again you have little contro, over the HTML.
NOTE: DataList and DataGrid both render as HTML tables by default.
Out of the 3 controls, I use the Repeater the most due to its flexibility w/ HTML. Creating a Pagination scheme isn't that hard, so I rarely if ever use a DataGrid. Occasionally I like using a DataList because it allows me to easily list out my records in rows of three for instance.
Regards,
Satips.
|
|
|
|
|
Read this:
1: http://aspnet.4guysfromrolla.com/articles/052103-1.2.aspx
2: http://www.geekinterview.com/question_details/4560
3: http://www.dotnetspider.com/qa/Question744.aspx
4: http://www.dotnetspider.com/qa/Question1312.aspx
Hope this helps u...
|
|
|
|
|
Hi all,
I developed a application with asp.net 2.0 (vb.net ) and sql server 2000.
My requirement is ... to take input in Arabic Language and store in Sql server, Similary some other pages..... i will retrive that data and show to user.....
Any idea to take input and shows the arabic language in web and store Arabic language in Database ......
Thanks
Sajjad
|
|
|
|
|
Use the unicode data types in the database: nvarchar and ntext. Use utf-8 as encoding for the page.
---
single minded; short sighted; long gone;
|
|
|
|
|
thanx for reply...
plz can u give some example or code or any link for application level.....
i m so confused
|
|
|
|
|
No reply yet
|
|
|
|
|
Hi every body,
Sessions are working fine in our "Test Server"(It maintains the Session time), but after hosting in the web, Sessions are not working (Session are expiring with in 30 sec)
Sunil
|
|
|
|
|
you might ask your hosting provider...maybe it's configured in machine.webconfig to take affect to all web applications
<< >>
|
|
|
|
|
What changes may take in machine.config as you said(Then i will convey to my team)
Sunil Tvl
|
|
|
|
|