|
sandeep,
there is a site - gridviewguys, that might help you i guess
Gautham
|
|
|
|
|
Hi all
Can anybody tell be how to get the culture info for all the languages .
Regards
Krishna Kumar
Kk
|
|
|
|
|
Hi IIS Gurus,
Please explain me the cause of below errors which logged into my eventviewer.
1. Inetinfo terminated unexpectedly and the system was not configured to restart IIS Admin. The World Wide Web Publishing Service has shut down.
2. Application pool 'DefaultAppPool' is being automatically disabled due to a series of failures in the process(es) serving that application pool.
3. A process serving application pool 'DefaultAppPool' terminated unexpectedly. The process id was '2648'. The process exit code was '0xffffffff'.
4. A worker process with pid '240' that serves application pool 'DefaultAppPool' has been determined to be unhealthy (see previous event log message), but because a debugger is attached to it, the World Wide Web Publishing Service will ignore the error.
5. Cannot register the URL prefix 'http://*:80/' for site '125470340'. The necessary network binding may already be in use. The site has been deactivated. The data field contains the error number.
6. Application pool 'DefaultAppPool' exceeded its job limit settings.
7. A process serving application pool 'DefaultAppPool' failed to respond to a ping. The process id was '2360'.
8. A worker process with process id of '2712' serving application pool 'DefaultAppPool' has requested a recycle because the worker process reached its allowed processing time limit.
9. A process serving application pool 'DefaultAppPool' exceeded time limits during shut down. The process id was '864'.
10. A process serving application pool 'DefaultAppPool' failed to respond to a ping. The process id was '2928'.
11. A process serving application pool 'DefaultAppPool' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '3992'. The data field contains the error number.
12. A process serving application pool 'DefaultAppPool' exceeded time limits during shut down. The process id was '2276'.
13. One of the IP/Port combinations for site '1399649786' has already be configured to be used by another site. The other site's SSL configuration will be used.
14. A worker process with process id of '2592' serving application pool 'DefaultAppPool' has requested a recycle because the worker process reached its allowed processing time limit.
Thanks in advance.
Srini
Srinu
|
|
|
|
|
(1)The World Wide Web Publishing Service's Inetinfo.exe process monitor encountered an error and has shut down. This condition prevents the World Wide Web Publishing Service from detecting an unexpected termination of the Inetinfo.exe process and, therefore, may not detect changes to the metabase as expected. It is recommended that you restart the World Wide Web Publishing Service.
(2)This is probably a permission issue with the Network Service account, since
your pages work under the Local System account. Check to make sure NT
Authority\Network Serivice is a member of the IIS_WPG group.
Regards,
Satips.
|
|
|
|
|
Thanks Satips for ur valueable reply.
As u said in 2nd one i checked and found that NT
Authority\Network Serivice is a member of the IIS_WPG group. Any other reason why this happen??
Regards
Srini
Srinu
|
|
|
|
|
Hi,
I have two forms say Default.aspx and popup.aspx
Default.aspx cotains a textbox whereas popup.aspx contains a text area.
When user enters more than 10 characters in a textbox of default.aspx,popup.aspx should open and all characters of text box should get transfer to textarea of popup.aspx.
The code that i had written using javascript is as follows:
function limitText(){
var textboxvalue = document.getElementById("limitedtext").value;
if(textboxvalue.length == 10)
{
alert(textboxvalue);
window.open("popup.aspx?value=textboxvalue","","resizable=1,width=600,height=200")
}
}
And This is textbox code:
******Retrieving value in popup.aspx********
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim strQuery As String = ""
strQuery = Request.QueryString("value").ToString()
TextArea1.Value = strQuery
End Sub
But When i put break point and check the value of strQuery, it is showing
"textboxvalue" instead of characters typed in the textbox.
I will be very grateful if you tell me that how should i pass the value through the url from the line:
window.open("popup.aspx?value=textboxvalue","","resizable=1,width=600,height=200")
Thanks
Shyam
|
|
|
|
|
But When i put break point and check the value of strQuery, it is showing
"textboxvalue" instead of characters typed in the textbox.
Because you are the biggest fool in this community.
Try this --
function limitText(){
var textboxvalue = document.getElementById("limitedtext").value;
if(textboxvalue.length == 10)
{
alert(textboxvalue);
var link = "popup.aspx?value=" + textboxvalue;
window.open(link,"","resizable=1,width=600,height=200")
}
}
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
shyamts wrote: window.open("popup.aspx?value=textboxvalue","","resizable=1,width=600,height=200")
the problem is here itself you are passing textboxvalue as a string not passing its value
try this
indow.open("popup.aspx?value="&textboxvalue.value&","","resizable=1,width=600,height=200");
or use +
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Be careful - Depending on what the value is this can be a major security hole as it can easily be changed by the user.
|
|
|
|
|
Yes Colin
Yes you are absolutely right but we don’t know for his application user have security as an issue or not. I showed only where he was wrong. But any way thanks for suggestion
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Yes, but that is true for any value that you get from the request.
Input is evil.[^]
---
single minded; short sighted; long gone;
|
|
|
|
|
I am an application programmer working in a private firm.I am now working on a project.
The prject is related to survey.So for this we have to genarate a word reaport after completing every survey.For this we run a vbscript file with scheduler.But the problem is
that it takes 45 minutes time to genarate every reaport.But the critical problem is that
when 9 user are put there survey at the same time then they have to wait for 9-15 hours.
So please give me the solution how can I speed up the time for reaport genaration using
.net.
Golam Md. Mostafa
Application Programmer
Web Spiders (India) Pvt. Ltd.
51B, Justice Chandra Madhav Road,
Calcutta - 700020, India
Cell: +91.92319.01511
Tel: +91.33.2474 3581
Fax: +91.33.2474 3500
Email: golam.mostafa@webspiders.com
URL: http://www.webspiders.com
- A Microsoft Gold Certified Partner and an ISO 9001:2000 certified company - INDIA . UK . USA
|
|
|
|
|
Tune your sql queries.
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Hi to All,
Anybody Tell me what is the Different between .NET 2005 AND .NET 2003.
Mohan Balal
|
|
|
|
|
there is no .net2003/5, only .net 2.0/3.0 which is the sdk for u to write applications.
Maybe u mean visual studio .net/ visual studio 2005, the latter is the later version embedded .net sdk 2.0
|
|
|
|
|
Ask our friend google!
You would find enough differences and new features in 2005
Gautham
|
|
|
|
|
Try to write a subject that better describes your question.
Visual Studio 2003 targets .NET framework 1.1, and Visual Studio 2005 targets .NET framework 2.0. That's the most distinguishing difference, other than that there are just a lot of small features added to VS 2005. As gauthee said, you can search the web to find information about these, that's the best way of finding answers to general questions like this. A forum like this is better suited for answering more specific questions.
---
single minded; short sighted; long gone;
|
|
|
|
|
Image img1 = getImage("select picture from database where id=1");
Image img2 = getImage("select picture from database where id=2");
pnl1.Controls.add(img1);//for example. not working;
pnl1.Controls.add(img2);
please help me for putting this images in part of page;
We Can Do Anything, If We Want It
|
|
|
|
|
YOu got to convert the image right! when you say select image it would not simply return imageinstead it returns binary data
Gautham
|
|
|
|
|
i know that is return binary data.
and i know how to convert binary data to image.
but i dont know how to put converted image to page on the fly without saving images in any folder?
We Can Do Anything, If We Want It
|
|
|
|
|
You can use a MemoryStream:
<br />
private static int chunkSize = 10000;<br />
private void writeData(object yourImageBinaryData){<br />
MemoryStream ms = null;<br />
int dataLeft = 0;<br />
<br />
try<br />
{<br />
dataLeft = ((byte[])yourImageBinaryData).Length;<br />
ms = new MemoryStream((byte[])yourImageBinaryData);<br />
<br />
while(dataLeft > 0 && Response.IsClientConnected)<br />
{ <br />
byte[] currentChunk = new byte[chunkSize];<br />
int currentChunkSize = ms.Read(currentChunk, 0, chunkSize);<br />
<br />
Response.BinaryWrite(currentChunk);<br />
<br />
dataLeft -= currentChunkSize;<br />
currentChunk = null;<br />
}<br />
}<br />
catch(Exception e){<br />
throw new Exception("writeData failed. " + e.Message);<br />
}finally{<br />
if (ms != null)ms.Close();<br />
ms = null;<br />
}<br />
}<br />
Hope it helps
Thomas
|
|
|
|
|
thank's for you.
but i want put all image for one user in the page
and Response.BinaryWrite or Response.OutputStream dose not Suport this
We Can Do Anything, If We Want It
|
|
|
|
|
You could putt each image in DataGrid, repeater, listcontrol.
You could also create your own class that contains the image from the database.
Something like this:
First create an empty .aspx page
<%@ Page language="c#" Codebehind="MyImageClass.aspx.cs" AutoEventWireup="false" Inherits="My.Publishing.MyImageClass" %><br />
The code behinde:
using System;<br />
using System.IO;<br />
using System.Drawing.Imaging;<br />
using Millum.Procurement.Imaging;<br />
using System.Runtime.Serialization;<br />
using System.Runtime.Serialization.Formatters.Binary;<br />
using System.Web;<br />
using System.Web.Caching;<br />
using System.Collections;<br />
namespace My.Publishing{<br />
public class MyImageClass : System.Web.UI.Page{<br />
private static int chunkSize = 10000;<br />
override protected void OnInit(EventArgs e){<br />
InitializeComponent();<br />
base.OnInit(e);<br />
}<br />
private void InitializeComponent(){<br />
uploadData();<br />
}<br />
private void uploadData(){<br />
string strID = null;<br />
<br />
strID = (Request.QueryString["attID"] != null)?Request.QueryString["attID"]:(Request.Form["attID"] != null)?Request.Form["attID"]:null;<br />
<br />
byte[] byteImg1 = getImage("select picture from database where id=" + strID );<br />
<br />
writeData(byteImg1);<br />
}<br />
<br />
<br />
private void writeData(byte[] yourImageBinaryData){<br />
MemoryStream ms = null;<br />
int dataLeft = 0;<br />
<br />
try<br />
{<br />
dataLeft = yourImageBinaryData.Length;<br />
ms = new MemoryStream(yourImageBinaryData);<br />
<br />
while(dataLeft > 0 && Response.IsClientConnected)<br />
{ <br />
byte[] currentChunk = new byte[chunkSize];<br />
int currentChunkSize = ms.Read(currentChunk, 0, chunkSize);<br />
<br />
Response.BinaryWrite(currentChunk);<br />
<br />
dataLeft -= currentChunkSize;<br />
currentChunk = null;<br />
}<br />
}<br />
catch(Exception e){<br />
throw new Exception("writeData failed. " + e.Message);<br />
}finally{<br />
if (ms != null)ms.Close();<br />
ms = null;<br />
}<br />
}<br />
<br />
Now the page where the images is viewed, this is an example with
a DataGrid, where the image is displaide in a imagebutton:
<br />
asp:datagrid id="dgImages" runat="server" CssClass="grid" AutoGenerateColumns="False" GridLines="None"<br />
ShowFooter="True"><br />
SelectedItemStyle Font-Bold="True" CssClass="grid_itemSelected"></SelectedItemStyle><br />
EditItemStyle CssClass="grid_itemEdit"></EditItemStyle><br />
AlternatingItemStyle CssClass="grid_itemAlternating"></AlternatingItemStyle><br />
ItemStyle CssClass="grid_item"></ItemStyle><br />
HeaderStyle Font-Bold="True" CssClass="grid_header"></HeaderStyle><br />
FooterStyle CssClass="grid_footer"></FooterStyle><br />
Columns> <br />
asp:TemplateColumn ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top"><br />
ItemTemplate><br />
asp:ImageButton ID="imgFT" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "lngImageID").ToString()%>' AlternateText="Show/Download$" CausesValidation="True"><br />
/asp:ImageButton><br />
/ItemTemplate><br />
/asp:TemplateColumn><br />
/Columns><br />
/asp:datagrid><br />
Then you need a ItemCreated method for the datagrid:
<br />
#region Web Form Designer generated code<br />
override protected void OnInit(EventArgs e)<br />
{<br />
InitializeComponent();<br />
base.OnInit(e);<br />
}<br />
<br />
private void InitializeComponent()<br />
{<br />
this.dgImages.ItemCreated += new System.Web.UI.WebControls.DataGridItemEventHandler(this.dgImages_ItemCreated);<br />
this.Load += new System.EventHandler(this.Page_Load);<br />
<br />
}<br />
#endregion<br />
<br />
private void dgImages_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)<br />
{ <br />
try <br />
{<br />
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) <br />
{<br />
DataRowView drv = (DataRowView) e.Item.DataItem; System.Web.UI.WebControls.ImageButton img = new ImageButton();<br />
img = (System.Web.UI.WebControls.ImageButton)e.Item.FindControl("imgFT");<br />
img.Click += new System.Web.UI.ImageClickEventHandler(btnImage_Click); <br />
if(drv != null)<br />
{<br />
int lngImageID = Convert.ToInt32(drv.Row["ID"]);<br />
img.BackColor = Color.Transparent;<br />
img.BorderStyle = BorderStyle.None;<br />
<br />
img.ImageUrl = "../MyImageClass.aspx"?attID=" + lngImageID.ToString();<br />
}<br />
catch (Exception err) <br />
{<br />
}<br />
}<br />
Ofcource you now have to get all the imageIDs from the user:
<br />
DataVies dvAllImageIDs = getAllImageIDsForTheUser();<br />
dgImages.DataSource = dvAllImageIDs;<br />
dgImages.DataBind();<br />
This code is bits and pizes of a hole bigger control, so theres
probably some errors, but you get the point.
Hope it helps
Thomas
-- modified at 4:42 Tuesday 17th April, 2007
|
|
|
|
|
how to create a javascript menubar?
|
|
|
|
|
Hope this Script may help you.
var xcNode = [];<br />
<br />
function xcSet(m, c) {<br />
if (document.getElementById && document.createElement) {<br />
m = document.getElementById(m).getElementsByTagName('ul');<br />
var d, p, x, h, i, j;<br />
for (i = 0; i < m.length; i++) {<br />
if (d = m[i].getAttribute('id')) {<br />
xcCtrl(d, c, 'x', '[+]', 'Show', m[i].getAttribute('title')+' (expand menu)');<br />
x = xcCtrl(d, c, 'c', '[-]', 'Hide', m[i].getAttribute('title')+' (collapse menu)');<br />
<br />
p = m[i].parentNode;<br />
if (h = !p.className) {<br />
j = 2;<br />
while ((h = !(d == arguments[j])) && (j++ < arguments.length));<br />
if (h) {<br />
m[i].style.display = 'none';<br />
x = xcNode[d+'x'];<br />
}<br />
}<br />
<br />
p.className = c;<br />
p.insertBefore(x, p.firstChild);<br />
}<br />
}<br />
}}<br />
<br />
<br />
function xcShow(m) {<br />
xcXC(m, 'block', m+'c', m+'x');<br />
}<br />
<br />
<br />
function xcHide(m) {<br />
xcXC(m, 'none', m+'x', m+'c');<br />
}<br />
<br />
<br />
function xcXC(e, d, s, h) {<br />
e = document.getElementById(e);<br />
e.style.display = d;<br />
e.parentNode.replaceChild(xcNode[s], xcNode[h]);<br />
xcNode[s].firstChild.focus();<br />
}<br />
<br />
<br />
function xcCtrl(m, c, s, v, f, t) {<br />
var a = document.createElement('a');<br />
a.setAttribute('href', 'javascript:xc'+f+'(\''+m+'\');');<br />
a.setAttribute('title', t);<br />
a.appendChild(document.createTextNode(v));<br />
<br />
var d = document.createElement('div');<br />
d.className = c+s;<br />
d.appendChild(a);<br />
<br />
return xcNode[m+s] = d;<br />
}<br />
Regards,
Satips.
|
|
|
|
|