|
Is your Gridview inside a form tag?
|
|
|
|
|
No it is not within a form tag. Where do i put the form tag??
|
|
|
|
|
put the form tag within body tag. put the gridview within form tag.
|
|
|
|
|
Hi,
Whats is the default width, height of the ASP.Net textbox. In my form I have textboxes and one custom control which is using writer.AddAttribute(HtmlTextWriterAttribute.Type, "text"); -> for this I need to set the height, width same as asp.net textbox to do the formatting.
I am setting like this in the custom control
writer.AddStyleAttribute(HtmlTextWriterStyle.Width, "138px"); here I need the asp.net textbox width? How we get the default width?
Thanks
|
|
|
|
|
Okay, here is the issue I am having:
I have created a web app that puts applicant's information into a database. From there the user can do a search for particular users. There is also a function to create a report based on a series of sql queries. The report is created by calling an existing word document, which is in a .doc format, and then replaces bookmarks in the file with the results of the queries. Once that is done, the vb code will then save the report under a new file name and then have the user either open or save the new file on their computer.
Here is where the problem lies. For the past month when I got this originally working, I was able to put my web app into the IIS on my computer so I could test it out on the internal network without migrating it to it's permanent home. It was all working fine until yesterday, when I rebooted my machine. Now, when I call the code to create the document, my browser's progress bar will stop at about 25% of the way and nothing will happen. I can see that the aspnet worker process is running and has called winword.exe and the sql process, but nothing will happen.
When I go to debug the app, here is the line that it is stopping on:
<br />
Dim doc As Microsoft.Office.Interop.Word.Document = wordApp.Documents.Open(filename, confirmConversions, isreadOnly, addToRecentFiles, _<br />
passwordDoc, passwordTemplate, revert, writepwdoc, writepwTemplate, format, encoding, _<br />
visible, openRepair, docDirection, notEncoding, xmlTransform)
The funny thing is that I can run the code just fine when I go back to my original debug folder on my machine. What am I doing wrong here?
|
|
|
|
|
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
Bitmap hojaBmp = new Bitmap(760, 1000, PixelFormat.Format32bppArgb);<br />
Graphics gr = Graphics.FromImage(hojaBmp);<br />
gr.FillRectangle(Brushes.White, 0, 0, 760, 1000);<br />
<br />
Font fnttxt = new Font("Courier New", 10, FontStyle.Bold);<br />
<br />
gr.DrawString("Texto", fnttxt, Brushes.Black, 50, 33);<br />
<br />
hojaBmp.Save(Server.MapPath("65656.jpg"));<br />
hojaBmp.Dispose();<br />
<br />
printOut = printOut + "<img style="\"width:100%\"" src="\"65656.jpg\"/">";<br />
<br />
}</img>
<%
Response.Write(printOut);
Response.Flush();
%>
window.print();
|
|
|
|
|
I want to maintain state of web form (i.e; not to lose any user input values of textboxes,checkboxes etc) without using session,querystring etc.
The reason i don't wanna use the above mentioned method is that i've got so many pages and it would be a tedious task to do.
Hope to have a better solution for this.
|
|
|
|
|
You can enable the ViewState
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
well the thing is across web pages i wanna do that
|
|
|
|
|
We can have classes which will hold values.
You will be able to access it across the pages.
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
Hi,
In my content page, I want to apply CSS style to only one textbox not for all the textboxes in page. How to apply the stle.
my css is for to make the textbox look like label.
<style type="text/css">
{
input
{ border : 0; }
}
How to apply this?
Thanks
|
|
|
|
|
you have to give the style a name and then assign the HTML element to the style using the HTML @class attribute
<style type="text/css">
{
.MyStyle
{ border : 0; }
}
<input type="text" class="MyStyle" ....>
|
|
|
|
|
Can any one help creating a folder on a clieck of a mouse button ,where i am taking input from a text box and the folder name would be the string value taken from a textbox.
please see the code below:
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
CreateFolder(Server.MapPath("."+ "test"))
Dim objFso
'# CREATE FOLDER
function CreateFolder(fdirCRE)
Set objFso = CreateObject("Scripting.FileSystemObject")
if Not objFso.FolderExists(fdirCRE) Then
objFso.CreateFolder(fdirCRE)
Else
Exit function
End if
Set objFso = nothing
End function
%>
<html>
<input type="button" ID="buttonCreateFolder" value="Create Folder" OnClick="CreateFolder()" />
</html>
lenin
|
|
|
|
|
hi,
I need some regular expression to validate the US mobile phone numbers, I've tried to find out myself but couldnt find any.
any help would be appreciated
Thanks in advance
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Do you know what the valid format for US cell phones is?
I have looked on www.regexplib.com - which is a useful repository of common reg expressions - and there doesnt seem to be one specifically for US cell phones. You might want to look there at the expressions that exist for German cell phone numbers and adjust according to the spec for US numbers.
|
|
|
|
|
no actually I dont know the format myself.
and I've also been thru regexlib.com. I thought some US native person could help me a little in this so I posted the question.
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
I might be wrong, but I think US cell phone numbers work very differently to most of the rest of the world. They are somehow attached to their fixed-line number or call plan so they dont have separate number formats like we do in the UK (ie, always starting 07).
Im possibly talking out my arse, but it strikes me as weird that regexplib.com doesnt list a format for US cell phones but lists 13 patterns for "US telephone".
|
|
|
|
|
J4amieC wrote: it strikes me as weird that regexplib.com doesnt list a format for US cell phones but lists 13 patterns for "US telephone".
That's exactly what I'm talking about. It's really weird u know
J4amieC wrote: They are somehow attached to their fixed-line number or call plan so they dont have separate number formats
That means I should put the same regular expression on Cell phone numbers as well right?
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Please tell me that can we create an array of dropdownlist in asp.net as we could do in vB by simply copying the control automatically the array will be created.
If there is some other way plz inform me
|
|
|
|
|
I wonder why you need that?
|
|
|
|
|
Actually i want to make an array of dropdownlist with same name and only difference in the index so that i can reduce the calling of my 31 dropdownlist .
In Vb we can do it by making copies of a dropdown list it will automatically make an array,but in asp.net we cant do that.
Is there any other way
|
|
|
|
|
Hi all,
iam using a javascript to lunch logoff function when a user presses X from the upper right corner of a browser. the JS function is as follows:
<br />
<script type="text/javascript" language="javascript" ><br />
function Window_OnBeforeUnload()<br />
{<br />
var iX = window.document.body.offsetWidth - window.event.clientX ;<br />
var iY = window.event.clientY ;<br />
if (iX <=30 && iY < 0 )<br />
{<br />
alert ("You will be logged Out From CID Good-Bye!");<br />
window.open('http://localhost:2018/CID/Logout.aspx');<br />
}<br />
} <br />
</script><br />
and in the body tag of the master page iam adding onbeforeunload="Window_OnBeforeUnload();" to execute the function.
My issue is that i want to close the browser after getting back from Logout.aspx. I have tried window.close() but is working some times and when it works it gives me a message that the browser is closing and dont close. I dont want this messgae to appear.
I know it is hard to capture all possible ways to close the browser but i need that because i want to free records on attempting to close i.e. i want to handle all closing ways that a browser can be closed by so i can execute a function. Is there a way to force the user to logoff other than this way?
Any ideas and thanks
|
|
|
|
|
Hi all,
I have a problem.
In my web application I have to load controls dynamically. I would like to access some properties of these controls. Assuming that the control that I have to load is called "MyControl.ascx". I have to write:
MyControl oNewControl = (MyControl)LoadControl("MyControl.ascx");
The problem is that my VS2005 don't find the MyControl name and give me a compile error.
I don't understand how to import the namespace there the MyControl definition is placed.
What I'm wronging???
can you help me?
Regards
Federico
|
|
|
|
|
Try compiling the user control code behind. Drop the DLL into the application bin and on the page, just import the namespace that your user control resides.
Then, this should work.
oNewControl = LoadControl("MyControl.ascx");
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
Federico Orlandini wrote:
MyControl oNewControl = (MyControl)LoadControl("MyControl.ascx");
MyControl.ascs should be under the same directory where the page that you wrote this code is located.
|
|
|
|