|
if u are trying to redirecting page from Code behind
then use Response.Redirect("HTTPS://YOU-PAGE-NAME");
rather being Response.Redirect("YOU-PAGE-NAME");
if this helps u then ok or explain ur senario
Ravi Kant Srivastava
(System Analyst)
HandsOn Technology & Engineering
Gurgaon
(India)
e-mail:ravikant@hte.co.in
|
|
|
|
|
Ok sorry its my mistake... i think i did'nt understood it..
it you want to change your HTTP pages (i.e.) in Secure then u have to use SSl ..
you got to register your IIS with SSL....
Ravi Kant Srivastava
(System Analyst)
HandsOn Technology & Engineering
Gurgaon
(India)
e-mail:ravikant@hte.co.in
|
|
|
|
|
hi,
I want to create date validation in client side using javascript i.e to display invalid date(checking all months & dates).I have searched in google & tried some of them ,but it doesn't work.
can anyone send the solution for this
Thanks in advance
|
|
|
|
|
Y dont u use date picker of javascript???if u dont get any code related to this then I will give u.
|
|
|
|
|
|
|
hi
see this script and check it once
function valDateRng(daterng) {
myOption = -1;
for (i=0; i<daterng.length; i++)="" {
if="" (daterng[i].checked)="" {
myoption="i;
}
}
if" (myoption="=" -1)="" {
alert("you="" must="" select="" a="" date="" range");return="" '="" ';
}
return="" daterng[myoption].value;
}
function="" stripblanks(fld)="" {var="" result="" ;for="" (i="0;" i<fld.length;="" (fld.charat(i)="" !=" " ||="" c=""> 0) {result += fld.charAt(i);
if (fld.charAt(i) != " ") c = result.length;}}return result.substr(0,c);}
var numb = '0123456789';
function isValid(parm,val) {if (parm == "") return true;
for (i=0; i<parm.length; i++)="" {if="" (val.indexof(parm.charat(i),0)="=" -1)
return="" false;}return="" true;}
function="" isnum(parm)="" {return="" isvalid(parm,numb);}
var="" mth="new" array('="" ','january','february','march','april','may','june','july','august','september','october','november','december');
var="" day="new" array(31,28,31,30,31,30,31,31,30,31,30,31);
function="" validatedate(fld,fmt,rng)="" {
var="" dd,="" mm,="" yy;var="" today="new" date;var="" t="new" date;fld="stripBlanks(fld);
if" (fld="=" '')="" return="" false;var="" d1="fld.split('\/');
if" (d1.length="" !="3)" ');
if="" false;
if="" (fmt="=" 'u'="" ||="" fmt="=" 'u')="" {
="" dd="d1[1];" mm="d1[0];" yy="d1[2];}
else" if="" 'j'="" 'j')="" 'w'="" 'w'){
="" false;
var="" n="dd.lastIndexOf('st');
if" (n=""> -1) dd = dd.substr(0,n);
n = dd.lastIndexOf('nd');
if (n > -1) dd = dd.substr(0,n);
n = dd.lastIndexOf('rd');
if (n > -1) dd = dd.substr(0,n);
n = dd.lastIndexOf('th');
if (n > -1) dd = dd.substr(0,n);
n = dd.lastIndexOf(',');
if (n > -1) dd = dd.substr(0,n);
n = mm.lastIndexOf(',');
if (n > -1) mm = mm.substr(0,n);
if (!isNum(dd)) return false;
if (!isNum(yy)) return false;
if (!isNum(mm)) {
var nn = mm.toLowerCase();
for (var i=1; i < 13; i++) {
if (nn == mth[i] ||
nn == mth[i].substr(0,3)) {mm = i; i = 13;}
}
}
if (!isNum(mm)) return false;
dd = parseFloat(dd); mm = parseFloat(mm); yy = parseFloat(yy);
if (yy < 100) yy += 2000;
if (yy < 1582 || yy > 4881) return false;
if (mm == 2 && (yy%400 == 0 || (yy%4 == 0 && yy%100 != 0))) day[mm-1]++;
if (mm < 1 || mm > 12) return false;
if (dd < 1 || dd > day[mm-1]) return false;
t.setDate(dd); t.setMonth(mm-1); t.setFullYear(yy);
if (rng == 'p' || rng == 'P') {
if (t > today) return false;
}
else if (rng == 'f' || rng == 'F') {
if (t < today) return false;
}
else if (rng != 'a' && rng != 'A') return false;
return true;
}
|
|
|
|
|
hi all,
how to display request form details in the notepad filled by the user(like name,addrss,emial, phone number etc).
|
|
|
|
|
can u be more specific?
Best Regards
3ala2
|
|
|
|
|
Hi,
i want to display in notepad which details are entered in the requestform fields.
ex: username :xxx
age:YY
phone no:zzz
these above details are given by user while filling the form. after submiting the details the i want to display those details in notepade as a text file.
thanks
|
|
|
|
|
On the code behind you can create a text file in memory and then in another page stream it to the client as a txt file...
Why do you want to do this?
|
|
|
|
|
Same as previous answer
And give a write permission for ASPNET user on the folder that u want to add the file on
Best Regards
3ala2
|
|
|
|
|
Hello,
I am investigating how to port my C++ MFC application with OpenGL to a web-application.
Searching the internet leads to many keywords, like plugins/ActiveX, X3D, OpenGL ch, Ajax3D and more.
I am completely unexperienced to web-programming, but I am willing to learn and apply this.
Can anybody advise me what could be a good direction?
Best regards,
Peter
|
|
|
|
|
Hi to all,
I have a web application for LAN. Every client (Node) have a File on spacifice location path(like "C:\Image001.jpg"). When every user Access this web Application as soon as his Local file (like "C:\Image001.jpg" Client File) will be automatically upload on the LAN Server without client Browser DialogBox Open.
I have try number of time but i have not got any thing.
Please help me..
Pavan Pareta
|
|
|
|
|
What you tried?
what error you got let all of us know ?
so that only we can help you.
Regards,
Satips.
|
|
|
|
|
My Problem is that i whant to upload File with out client Browser DialogBox Open.
but
<input id="MyFile" type="file" size="23" name="MyFile" runat="server"> Not support for internal upload files.
Pavan Pareta
|
|
|
|
|
I think you'll have problems doing this, as it circumvents the security on any browser to permit this kind of behaviour...
|
|
|
|
|
hi,
have you any idea that how can bind enum type to dropdown.?
i am usinf asp.net 2.0 with vb.net.
Thanks,
Sun Rays
|
|
|
|
|
Try it like this.
public enum Color
{
RED,
GREEN,
BLUE
}
Every Enum type derives from System.Enum. There are two static methods that help bind data to a drop-down list control (and retrieve the value). These are Enum.GetNames and Enum.Parse. Using GetNames, you are able to bind to your drop-down list control as follows:
protected System.Web.UI.WebControls.DropDownList ddColor;
private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
{
ddColor.DataSource = Enum.GetNames(typeof(Color));
ddColor.DataBind();
}
}
Hope this will Solve your problem.
Regards,
Satips.
|
|
|
|
|
How to add and configure TextBox in Item template datalist controls for update the rows....Please send a HTML Coding
With Regards,
Samson
|
|
|
|
|
hi see this code template
<itemtemplate>
<asp:textbox>
Protected Sub DataList1_UpdateCommand(ByVal source As Object, _
ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs)
Dim categoryID As String = _
DataList1.DataKeys(e.Item.ItemIndex).ToString()
Dim categoryName As TextBox = _
CType(e.Item.FindControl("textCategoryName"), TextBox)
Dim description As TextBox = _
CType(e.Item.FindControl("textDescription"), TextBox)
SqlDataSource1.UpdateParameters("original_CategoryID"). _
DefaultValue = categoryID
SqlDataSource1.UpdateParameters("categoryName"). _
DefaultValue = categoryName.Text
SqlDataSource1.UpdateParameters("Description"). _
DefaultValue = description.Text
SqlDataSource1.Update()
DataList1.EditItemIndex = -1
DataList1.DataBind()
End Sub
|
|
|
|
|
how to write a event for a dynamically created controll in C#,
For Example i have created a combo box, Check Box dynamically in C#,
when a User Select a item from combo box, it will will show which item he has selected using a message Box.
Please help me out.
burhan
|
|
|
|
|
Suppose myCombo is the name of your dynamically created control....then add a Event handler like this....
myCombo .SelectedIndexChanged += new System.EventHandler(this.cmbDynamicNameCombo_SelectedIndexChanged);
Now put your code in cmbDynamicNameCombo_SelectedIndexChanged
Tirtha
Miles to go before I sleep
|
|
|
|
|
Hi All,
I work on Crystal Report for .Net. with Asp.net 2005.
How can I Open Crystal Report in PDF format in Browser Window.
in Other word m when I click print button automaticaly Open the Report in pdf format in the browser.
Ala Qunaibi
Ala Qunaibi
|
|
|
|
|
Its something like export crystal report to pdf.Try this:
On Export Button Click:
private void Button1_Click(object sender, System.EventArgs e)
{
MemoryStream oStream; // using System.IO
oStream = (MemoryStream)
report.ExportToStream(
CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(oStream.ToArray());
Response.End();
}
|
|
|
|