|
Hi All,
I am writing a user control which needs to allow users to enter simple HTML tags into a text box (strong, emphasis etc). Obviously, ASP.Net stops this by default.
If I were to write a page to do this, I know that I could use ValidateRequest="false" in the Page Attribute (this is all I can find on Google, which is frustrating as I already knew about it!)
The problem is that I am trying to do this in a single user control and do not have access to either the Web Config for the entire site or the code of the pages that this control will be used on.
Does anybody know of a way to do this? Or can anybody point me towards an article that solves the same issue?
Thanks,
Chris
[Edit: I can't use AJAX, so no AJAX solutions please!]
modified on Friday, June 5, 2009 7:02 AM
|
|
|
|
|
No possible, it seems by design.
|
|
|
|
|
A little out of date now, but thank you anyway
|
|
|
|
|
Hello,
I have created one crystal report in VS 2005. Its datasource is ref cursur returned by oracle stored procedure and it is working fine except one formula filed which i have code like following:
Here CURSPKG_JOIN is the name of oracle package and
OPEN_JOIN_CURSOR1 is the name of stored procedure.
Name of formula field is:finalres
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R1}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R2}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R3}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R4}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R5}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R6}='G',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='1','FIRST DIVISION BY GRACE',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='2','SECOND DIVISION BY GRACE',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='3','THIRED DIVISION BY GRACE',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='C','SUPPLEMENTARY',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='F','FAILED',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='P','PASSED',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='Z','PARTIALLY PASSED',
'xx')))))))
,
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='1','FIRST DIVISION',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='2','SECOND DIVISION',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='3','THIRED DIVISION',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='C','SUPPLEMENTARY',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='F','FAILED',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='P','PASSED',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='Z','PARTIALLY PASSED',
'yy'))))))))
and i put this formula filed on to the report; but it is printing the required result at somewhere and somwhere no print (even, i have given the false part i.e. 'xx' and 'yy') even with the same condition. I have double checked the data in the table and just for checking; i have placed the FR column on the report, which is carrying right value though. FR column is varchar2 length 1 character.
Please guide me where i am missing....!
Thanks & Regards
Girish Sharma
|
|
|
|
|
|
Solved it ... don't know if this is the best way ... but it works
protected void Page_Load(object sender, EventArgs e)
{
....
if (!Page.IsPostBack)
{
if (!String.IsNullOrEmpty(Request.QueryString["index"]))
this.tabs.ActiveTabIndex = Convert.ToInt32(Request.QueryString["index"]);
}
.....
}
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
I have a listbox that's values populate from a SQL datasource. In the form on the page there is also a gridView and when it's value changes the items in the listbox should change accordingly (well, technically, it should changes a sql parameter that updates the listbox).
In another SQL query I have an array of values. I then turn that into a string array. The values in that string array correspond to values in the listbox I'd like selected. This is where I'm running into trouble - how do I get the listbox items to be selected? I can't find a way to update the listbox.
Does anyone has any suggestions?
Any help is appreciated!
Thank you!!!
|
|
|
|
|
If you're doing a postback, just inject the HTML to select the item. If you're using a server control, you can probably just set properties on the control.
Without knowing how you're doing this ( AJAX? ) ,it's hard to say more.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
The goal of this project is to develop a website where users can enrol in a
chess competition and play each other until the final winner is decided.
The website will require an administrator to set up the competitions. Users
can then enrol in a competition by clicking on the appropriate link and
logging on. When the competition has sufficient players enrolled, players
are randomly selected to play each other in the initial round. Winners and
losers are then appropriately selected to play each other until the winner is
decided. To inform users that it is their turn to make a move, the server
should notify players via email. Winners, losers and new competition
announcements are also notified via email.
Optionally, the game can have drag and drop interactivity for players to
make moves. Players can also nominate to play against one of a number
of chess engine on the website if they want. The Administrator has the
option to have advertisements sent with the notification email messages.
Whenever an advertisement is sent to a player via email the advertiser's
account is charged a nominal rate, say 2c per add.
The above specifications should be taken as a guide only and may be
varied by making a request to the project supervisor. The group is
permitted to use an open source chess engine on this project (with
acknowledgments). e.g.
http://www.linuxlinks.com/Software/Games/Board/Chess/Engines/index.sh
tml
|
|
|
|
|
I assume the group you're part of has been assigned with this task as homework. If your attempt at research is to post it here and hope someone will do ( a LOT ) of work for you, then you're going to fail, and deservedly so.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
What help do you want? Do you think some one is gonna write code for you?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Come with a specific problem not with expecting complete solution from some one.
|
|
|
|
|
Thanks for the descriptive narration. But it seems at the end of it, you missed to form a query on what you are expecting?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
I can do this, contact me via this website for a quote.
|
|
|
|
|
I can do it easily but this would cost you.
Let me know if you want to take it further..
Thanks
Andyyy
|
|
|
|
|
hi,
I am using an html tag to display an image in my aspx file. But when I run my project, the image is not getting displayed. But if i navigate to a different page and then hit the back button, the image is getting displayed....
Can anyone help me???
|
|
|
|
|
Impossible to help based on this. If your img tag is pointing to the right location, then it will work. Are you using absolute, or virtual paths ?
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hi, am using the virtual path and the path is pointing to the right location....
|
|
|
|
|
If it's right, then it will work. Put in an absolute path and see what happens.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
some times it will not display images with source like "../../images/logo.jpg" but it will work with asp image.
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
I gave the absolute path and even used the asp image button, but its still nt working...
|
|
|
|
|
Hi,
can you paste your code here. So that I can view and help you to solve your problem
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
hi....
here i have create a runtime link button.
but i can't get it's click event fired.
----------------------------------------
LinkButton lnk = new LinkButton();
lnk.Text = row1["FileName"].ToString();
lnk.ID = row1["FileName"].ToString();
lnk.Visible = true;
lnk.Click += new System.EventHandler(this.LinkButton_Click);
this.tdFile.Controls.Add(lnk);
here is the click event of link button which is not fired.......
protected void LinkButton_Click(object sender, EventArgs e)
{
//OnClick Event Handler for linkbutton
}
kindly help me to solve this issue.Thanks.
|
|
|
|
|
You need to add the button before the page load event if you want viewstate to be restored.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
THANKS A LOT.
I put my code in Page_Init and it works.
|
|
|
|