|
You need to create an aspx page, paste your HTML into it, then replace html elements with server controls if you want to interact with them in code behind.
Don't replace the whole page with HTML, you need to keep the page declaration, for sure. I am pretty sure there's a form tag you need to put all your HTML in as well, and obviously there's stuff in a normal HTML page you'd lose, like the head section and the page tag.
Basically, it sounds to me like you used a WYSIWIG tool to create a website, and you need to both better understand the resultant HTML, and learn about ASP.NET, before you'll be comfortable doing what you're proposing.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I am working through the small business kit as a first project.
Uptil now I have been able to get things working as I needed, but this new page has me stuck.
I am adding a dictionary to one page; a panel with the alphebet on the left column, and the terms and definitions in the center column. Click the left column, and terms appear in the center.
The dictionary is in an XML file with categories and child terms, the schema should be correct.
Every example I can find is haveing either the page reload with a single item, or has each item load in a seperate details page.
Is it possible to target a panel with a querystring without reloading a age, or am I going to looking into AJAX for this?
|
|
|
|
|
HI,
I want to provide security to my website like
1. If he use back button then i need to expire the session
2. If he edietd the session then also i need to abandon the session
3. IF he entered other site url rather than my domain name i need to abandon the session
How can i do this can anyone help me regarding this.
Thanks,
Manoj
|
|
|
|
|
manoj22184 wrote: If he use back button then i need to expire the session
Handle the back button click using JS and redirect to other page which can kill the session. But keep it in mind, this is nasty.
manoj22184 wrote: If he edietd the session then also i need to abandon the session
Editing session ? How it is possible ?
manoj22184 wrote: IF he entered other site url rather than my domain name i need to abandon the session
Impossible.
|
|
|
|
|
ForumExpertOnLine wrote: Editing session ? How it is possible ?
Does he mean cookie tampering or something similar to
http://en.wikipedia.org/wiki/Session_hijacking[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
you can't do this
1 - any code that runs on the back button, is easily deleted
2 - how can someone edit the session when it runs on the server ?
3 - the session is actually orphaned when someone browses elsewhere and will time out of it's own accord.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
manoj22184 wrote: If he use back button then i need to expire the session
Keep using location.replace for all the links. That way, the back button can be rendered void.
manoj22184 wrote: If he edietd the session then also i need to abandon the session
If he tampers the session cookie, wouldn't the runtime itself abort the session? Also read this http://en.wikipedia.org/wiki/Session_hijacking[^]
manoj22184 wrote: IF he entered other site url rather than my domain name i need to abandon the session
Little difficult though not impossible. Try using a frameset of 0%, 100% and if he types the address in the address bar, the framesets would unload and you can fire a AJAX request to kill the sessions.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
I am working with a home rolled custom gridview, no problems using it before, that allows for paging. I am using an AJAX tab panel and asp panel to contain the gridview. When I return a single record (in a generic list) and bind to the gridview all is well. The problem is that if I return multiple records and bind to the gridview, the gridview's width will extend beyond the boundaries of its containing panel to the side of the web page.
Thanks,
Steve
|
|
|
|
|
Note: My custom gridview is a subclass of the ASP gridview with paging added.
|
|
|
|
|
Hi,
I am using MasterPages in my project. It is working fine.
In some child pages MasterPage content(Images, MenuControl) is not visible. ChildPage Content(<asp:content... xmlns:asp="#unknown">) is overriding the masterPage content.........How to Avoid?
How to move the Content<asp:content.....>)control in child page?
Note: Most of the pages it is looking good but int two or three pages it is happening...
Thanking you
McMilan.
|
|
|
|
|
<%@ Page aspcompat="true"%>
<%
Dim cgiPath = "sessearch.cgi"
Dim scrName = Request.ServerVariables("URL")
Dim query = Request.ServerVariables("QUERY_STRING")
if query <> "" then
Dim url = cgiPath & "?" & query & "&wrap=" & scrName
Dim xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
Try
xml.Open("GET", "http://localhost/" + url, False)
Catch ex As Exception
Dim newUrl As New UriBuilder (Request.Url.Scheme, Request.Url.Host, Request.Url.Port, cgiPath & "?" & query & "&wrap=" & scrName)
xml.Open ("GET", newUrl.ToString, False)
End Try
xml.Send()
Response.write (xml.Responsetext)
end if
%>
|
|
|
|
|
Hi,
My project is in asp.net 2.0 with c#.
In my project I have to display Multi Column in a single dropdown.
like name and address on one dropdown.
Can any one tell me how i can do it.
thanks
|
|
|
|
|
|
Thanks for replying me.
i gone through that articles.
but i wont get solution exectly.
as they uses third party control.
also with that control i am unable to bind text value field.
actully i have to show some text and during saving it to data base i have to store value which is index field.
with third party control i am not getting it.
so that i am unable to solve my problem.
can u please help me.
|
|
|
|
|
I dotn think there is another way to do it
The dropdowlist is not really designed for multi columsn.
Why not try a different method like a listbox?
|
|
|
|
|
|
I call it a draw between the two of you!!
I would prefer to use the listbox as the multi column dropdwonlist isnt a custom control
|
|
|
|
|
Can u tell me how i can show it with list box.
|
|
|
|
|
Yes you are right...
And There are 100s ways doing this.
Did you check the answer,That I've given?
|
|
|
|
|
What do you mean?
|
|
|
|
|
Thanks For replying me.
I did check it.
but my problem is not solved.
if possible tell me solution.
thanks
|
|
|
|
|
I suggest you to select multiple columns in t-sql statement and cast as single column,then bind dropdownlist with that query.
Example:
T-SQL Query
Select column1+' '+ Column2+' ' +column3 as MultipleColumns from TableName
Binding DropDownList
DropDownList1.DataValueField = "ColumnName";<br />
DropDownList1.DataTextField = "MultipleColumns ";
Hope this will give you an idea.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
hi everyone
i am using fileupload control in usercontrol but i am not able to save it when i am calling this to any page .
plz suggest me .
thanks inadvance
gaurav
|
|
|
|
|
How you are accessing the control in other pages.
Or what problem you are getting?
Did you try by creating a public property in the control, That return required information of the fileupload control?
|
|
|
|
|
thanks for the response
actually i have fileupload control in a usercontrol for retriveing the name of the file or image i am using property:
public string pic
{
get
{
return cchildpic.FileName;
}
}
and at code behind this code:
if (cchildpic.FileName != "")
{
cchildpic.PostedFile.SaveAs("C:/Upload1" + cchildpic.FileName);
}
and after that i am using this usercontrol at page2 by drag and drop the user control .
this is the small part of the app. if more require then i will give more explanation about app.
thanks...gaurav
|
|
|
|