|
i m devloping web application. i want to encode to url. that means user cannot access any page directly by url.how to encode the url.
modified on Tuesday, January 01, 2008 5:39:28 AM
|
|
|
|
|
<%@ Page Language="C#" %>
<html>
<head>
<title>Encoding URL Strings</title>
<script runat="server">
void UrlPathEncode()
{
string StrToEncode;
string StrToReturn;
StrToEncode = "UrlPathEncode.aspx? Arg = foo";
StrToReturn = Server.UrlPathEncode(StrToEncode);
Response.Write("<a href=\"" + StrToReturn + "\">" + StrToReturn + "</a>");
}
</script>
</head>
<body>
<% UrlPathEncode(); %>
</body>
</html>
Usman Munier
Xavor Corporation Pakistan
|
|
|
|
|
Encoding the URL and making the page not accessible by the user directly are different things. Do you want to do URL encryption? or How do you want the user to access indirectly?
|
|
|
|
|
hi,
i am new to javascript i want to know how to change the caption of alert or confirm message box
if any one knows then plz do let me know
regards
sindhu tiwari
its me sid
|
|
|
|
|
hi Sid,
there isn't any way to change dialog box captions for alert, prompt or confirm
Usman Munier
Xavor Corporation Pakistan
|
|
|
|
|
hi usman
Happy new year ..Is there any way in which we can design our own message box in java script....? as per my RnD VB script has this option
regards
sindhu tiwari
its me sid
|
|
|
|
|
thanx for the new year wish same to you
sindhu i have not worked with VB Script so often i used to play with java script so i dont know its possible or not but in java scripts you can make your own alert look a like controls.
Regards,
Usman Munier
Xavor Corporation Pakistan
|
|
|
|
|
Hi,
i am creating one organizational chart control in whch i wann a add external link like hyperlink or any related to tht.plz suggest me how to add tht link in Rectangle.
|
|
|
|
|
You can overlay the hyperlink on the rectangle.... just use the absolute position and specify the left and top explicitly..
|
|
|
|
|
in hyperlink ther is no top or left property.and we can add hyperlink to some container bt here i wann a add in rectangle.if u have few line of code thn cn u plz send it to me.
|
|
|
|
|
Krupa wrote: in hyperlink ther is no top or left property
You have to use CSS for that.. For example : position:absolute; top:10px; left:10px
|
|
|
|
|
iam having a grid view iam filling the gridview with the text entered in the serverside textbox now i want the text entered in the textbox should convert into a sentence case that is first letter captial.
|
|
|
|
|
I think you need to the javascript to convert the first letter to captial letter on keypress event of textbox..
OR You may also try to use CSS (capitalize or first-letter) http://www.codeproject.com/script/Forums/View.aspx?fid=12076&msg=2370304[^] but I'm not so sure whether you can use it or not for your case. so, it's better if you can write the js function to covert the first letter..
|
|
|
|
|
Hi,
Here's what's going on:
*) User clicks on a location of the website, firing off a .NET function (in a .cs file)
*) This routine comes up with a particular database key that is used to link a related table to another one.
*) Next, take that key and re-populate a GridView with the information it found in the related table.
Problem is, the GridView doesn't post-back or refresh or whatever they call it (I'm traditionally straight Win32 C so this is rather frustrating!).
Here's the code that I'm using thus far. Any help would be appreciated. Thanks!
GridView rd = relPanel.FindControl("GridView1") as GridView;
if (rd != null)
{
SqlDataSource relatedDataSource = Page.FindControl("SqlDataSource1") as SqlDataSource;
if (relatedDataSource != null)
{
// This gives us the Site_ID that we need for our query.
// dtr["SITE_ID"].ToString()
// Our command
string myquery = String.Format("SELECT SITE_ID, PLANTTYPE, BARCODE, TIMESTAMP FROM Samples WHERE (SITE_ID = '{0}')", dtr["SITE_ID"].ToString());
SqlConnection myConnection = new SqlConnection(relatedDataSource.ConnectionString);
SqlDataAdapter ad = new SqlDataAdapter(myquery, myConnection);
DataSet myds = new DataSet();
ad.Fill(myds, "Samples");
rd.DataSourceID = null;
rd.DataSource = myds;
rd.DataBind();
|
|
|
|
|
Hi,
I have created a report (.rdlc) and using a reportViewer control want to showing it.
All tasks is OK in point of my view but when running my web site project (locally )in the web form that the report should appear, this error message apperes:
"An error has occurred during report processing.
The type specified in the TypeName property of ObjectDataSource 'ObjectDataSource1' could not be found"
Do you encountered it? what is it for?
Best wishes
|
|
|
|
|
mehrdadc48 wrote: type specified in the TypeName property of ObjectDataSource 'ObjectDataSource1' could not be found"
That tells you what is wrong. I'd suggest looking into ObjectDataSource1 and finding out why.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How can i set the AutoPostBack property for some items in the dropdownlist ?
Example: When i select some items in the dropdownlist, i want the page to postback, while other items should not.
|
|
|
|
|
set the AutoPostBack property to FALSE for the dropdownlist (ddl). Create a javascript fucntion e.g.
<br />
<br />
function ddlOnchange(selectedValue)<br />
{<br />
if(selectedValue == 'yourrequired value')<br />
document.formname.submit();<br />
else<br />
return false;<br />
}<br />
<br />
and add onchange attribute to the ddl in code behind file e.g.
<br />
ddl.Attributes.Add("onchange", "javascript:ddlOnchange(this.value);");<br />
-----
|
|
|
|
|
i dont think you can achieve this with ASP.NET becasue postback is a property of Control not the items associated with that control. for this you have do some extra work to make a custom drop down but still not sure its possible or not.
Usman Munier
Xavor Corporation Pakistan
|
|
|
|
|
Hi
How to get the values of dynamic fileupload controls in Submit button click without using AJAX.
I am creating the control/setting the IDs at runtime.
FileUpload uploadDataFile = new FileUpload();
uploadDataFile.ID = "FileUpload1";
Thanks in advance
|
|
|
|
|
|
Please don't cross post. This same question was asked here[^]. Both threads now have answers (and different answers) which causes people to look in two different places for an answer to the same question.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
hi,
anybody know how to use response.redirect in AJAX update Panel
|
|
|
|
|
<asp:UpdatePanel ID="udpAdd" runat="server">
<ContentTemplate>
<asp:Label ID="lblOffId" runat="server" Width="30px"></asp:Label>
<asp:Button runat="server" ID="Button1" Text = "Click me" OnClick="Button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx");
}
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
there is a problem with Ajax update pannel and thats why you cannot use Response.Redirect. to use this you have to take your button out of Update Pannel
Usman Munier
Xavor Corporation Pakistan
|
|
|
|