|
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
Me.EnableViewState = False
divprojects.RenderControl(hw)
Response.Write(tw.ToString())
Response.End()
I'm using following codding for downloading dividion data into excel file that proper work into IE. but not in mozila, there saved as aspx page....
So what to do changes in following codding, please send me reply on my email id : pranav.kalayni@gmail.com
Name : Pranav Kalayni from Mumbai
|
|
|
|
|
I want to create e commerce web site using asp.net . for this I need
design and architecture documentation for refrence. It will really
helpful if any body have it. Thanks
sachin
|
|
|
|
|
i have some photos in my web site that i have uploded from ftp
when i want to delete these photos or overwrite thses photos then i got error access denied but photos that i have uploded from my site i wll be able to delete and overwrite why is it so
|
|
|
|
|
How to execute in ffmpeg in online server
|
|
|
|
|
Hi,
I need regular expression to validate input string which can not accept [()==<>'~!#$^%*=]+" and regular expression for float which can check if user enters more than four digit after decimal like 1111.12345 .
3333.222 – Valid
3333.1234566 – Invalid
Regards
Rajesh
rajesh
|
|
|
|
|
hello there,
i'm developing an editable grid user control in asp.net + vb.net, which i can use for my other projects as a control.
i' using a gridview control with Edit,update,delete,cancel image buttons. i wrote a template column class to generate gridview colums dynamically. the idea is to give flexibility to the programmers to add template columns dynamically (i.e. Textbox column, DDL Column, Checkbox Column etc.) according to the programming need.in my template column class i can set multiple FieldValidators for the column like RequiredFieldValidator, Range Validator etc.)
the problem that i'm facing is when i click on the row update button of gridview it validates the textbox in the column but when i click any control outside the grid or another row in the gridview by mouse then the validation don't fire.i want that the user should enter a proper value in the control or just cancel editing and while editing a row he should not be able to focus on any other control on the webpage.
can anybody help me in this regard.it's a bit urgent.
please reply considering i'm beginner to asp.net and vb.net.
Thanks in advance.
|
|
|
|
|
I have code asp.net:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
#translate
{
height: 290px;
width: 756px;
}
</style>
<script type="text/javascript">
function hienthi1()
{
var x=document.getElementById("translate").contentDocument.getElementById("text").innerHTML=document.getElementById("txt").value;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<iframe id="translate" runat="server" src="http://translate.google.com.vn">Google dịch anh việt</iframe>
<br />
<input type="text" id="txt" value="ABC" runat="server" /><br />
<span id="span" runat="server"></span><br />
<asp:textbox id="TextBox1" runat="server" height="76px" width="754px" xmlns:asp="#unknown"></asp:textbox>
<br />
<input type="button" onclick="hienthi1();" value="Xem" />
</form>
</body>
</html>
But I amnot sussessful!
Help me!
|
|
|
|
|
[when the session is null we are by default directed to home page.]
At first when we login and perform transactions we carry the session values from one page to second page.At this second page if we remain idle for some time, the session automatically clears off. This causes us to reach back to home page . How to avoid this?
We have included the following code in the web.config file,but still we are having the same problem.
<system.web>
<sessionstate timeout="1000">
|
|
|
|
|
apart from web.config you also to need to make changes in IIS
|
|
|
|
|
hi,
the default time out for session is 20 sec r 5 min pertains up on the versions.Dont use it on webconfig.use the session code at global.asax file.Let me know if u don know the script.i hope U could try it.
Ramprathap S.S
|
|
|
|
|
deepthy.p.m wrote: following code in the web.config
What ?
The behavior as per design I guess.Your sessions might be timing out.
Read this [^]
And many more:[^]
|
|
|
|
|
Assume Page A calls Page B and you dont want to go back from page B to Page A. Simply include this code in Page A.
javascript:window.history.forward(1);
i use this code wat if i want to come back to a from any other page this is also not possible pls help..
|
|
|
|
|
Protected Sub cmdOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdOk.Click
Dim str As String = ""
str = ConcatAirCode()
cmdOk.OnClientClick = "Done('" & str & "','" & strTextId & "')"
End Sub
I did this in code behind because i need to pass two variables in my Js function Done.
It works but requires two clicks as it is posting the page on the first click.
Any one got the way around it.
|
|
|
|
|
hi guys i'm developing a web application using n-tier archi i.e (4 tiers).
currently i'm facing problem in assigning the values to the labels which is present in a gridview and its a Template field, i'm enclosing the coding part where i'm facing the problem, i would appreciate any suggestion to solve this...
code runs here......
private void l_DataBinding(Object sender, EventArgs e)
{
_objActiveInpatient = new ActiveInpatient();
// get the control that raised this event
Label l = (Label)sender;
// get the containing row
GridViewRow row = (GridViewRow)l.NamingContainer;
// get the raw data value and make it pretty
string RawValue =DataBinder.Eval(row.DataItem,columnName).ToString();
//// I AM GETTING EXCEPTION IN THE ABOVE LINE SAYING DataBinding: 'MediQMBELib.BusinessEntityCollection`1[[MediQMBELib.ActiveInpatientReports.ActiveInpatient, MediQMBELib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' does not contain a property with the name 'PatientName'.
switch (dataType)
{
case "DateTime":
l.Text = String.Format("{0 : d}", DateTime.Parse(RawValue));
break;
case "Double":
l.Text = String.Format("{0 : ###,###,##0.00}",
Double.Parse(RawValue));
break;
case "Int16":
case "Int32":
l.Text = RawValue;
break;
case "String":
l.Text = DataBinder.Eval(row.DataItem,columnName).ToString();
break;
}
}
BUT THE PROBLEM IS THE FILE IT IS REFERRING FOR THE PROPERTY IS NOT CORRECT, AS ITS SEARCHING IN DIFFERENT .CS FILE, I'M UNABLE TO UNDERSTANDING WHY THE CONTROL IS PASSING TO DIFFERENT FILE RATHER THAN THE ACTUAL BUSINESS LAYER FILE...
ONE MORE THING I'D LIKE TO MAKE IT CLEAR THAT I'M GETTING COLLECTION OF OBJECTS i.e 2 ROWS IN THAT ROW.DATAITEM AND I'M TRYING TO ASSIGN IT TO A STRING RAWDATA BUT, I NEED SOLUTION HERE SO THAT I CAN ASSIGN THE TEXT TO THE LABEL....
I WOULD BE VERY HAPPY IF SOME ONE PUTS LIGHT ON THIS......
|
|
|
|
|
Have you checked in the debugger what the type of row.DataItem is ? I think it's probably not what you expect it to be.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
HI Christian thanks for your reply...
i couldn't find the debugger u mentioned.... can you be bit clear on this....
|
|
|
|
|
jmk_cooljack wrote: i couldn't find the debugger u mentioned.... can you be bit clear on this....
It's simple. You have no idea what you're doing. Buy a very basic book on ASP.NET and the IDE and read it. You should not be at a point of working on any remotely functional code if you haven't worked out how to use your tools.
Try googling the word 'breakpoint' in conjuction with VB.NET or C#, whichever you are using.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi
my dear friend i think you didnt check out the next thread which i've posted, but ur reply was to my debugger post..... its k, the type of the dataitem is again the collection class itself so the control is passed to the collection class... now how can i assign the collection values in the lable_databinder method?
|
|
|
|
|
hi
actually the type of Datarow is
{MediQMBELib.BusinessEntityCollection<mediqmbelib.activeinpatientreports.activeinpatient>}
but thats the problem, in rest of the project the get () and set() properties for the fields works fine with the original business layer class but, for this its bit different....
|
|
|
|
|
I am learning about globalization using ASP.NET. Can someone explain what are the differences in behavior by setting culture info in thread vs. in page? Followings are 2 examples:
Setting Culture in Thread
protected override void InitializeCulture()
{
string culture = Request.Form["DropDownList1"];
if (culture==null)
{
culture = "en-US";
}
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(culture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
base.InitializeCulture();
}
Setting Culture in Page
protected override void InitializeCulture()
{
string culture = Request.Form["DropDownList1"];
if (culture==null)
{
culture = "en-US";
}
UICulture = culture;
Culture = culture;
base.InitializeCulture();
}
|
|
|
|
|
Mokai wrote: Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(culture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
This sets the culture on thread level.
Mokai wrote: UICulture = culture;
Culture = culture;
This sets the culture on Page level
Read more[^]
|
|
|
|
|
Can you elaborate a bit more? From a user's stand point, what are the differences? What does setting culture at the thread level actually mean and what effects does it have? Thanks.
|
|
|
|
|
|
Dim sScriptWindowOpen As String = "<script>window.open('message.htm',null,'left=400, top=100, height=250, width= 250, status=n o, resizable= no, scrollbars= no, toolbar= no, location = no, menubar = no');</script>"
ClientScript.RegisterClientScriptBlock(Me.GetType(), "anything", sScriptWindowOpen)
|
|
|
|
|
Is there any any error showing in the browser ? Did you look for it in the HTML ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|