|
Hi
I am using AccessdataSource with a formView and I have an Auto number column called PID how can i get the PID value of the inserted redord I am using VB.Net please help thanks.
Mohammad Al Hoss
Development To Me Is A Pleasure more than a Job
|
|
|
|
|
Mohammad Al Hoss wrote: please help thanks.
Sure why not, here you go[^]
|
|
|
|
|
ASALAMOALEKUM ALL,
I am using fileupload control in my website to allow user to uplaod a display picture for its profile page.
The problem is fileupload1.filename takes only filename not the whole path and while using the following
fs = new FileStream(@imagename, FileMode.Open, FileAccess.Read);
FileAccess.Read is throwing exception that the requested file is not on the root path i.e;
for eg: if user browse an image to be uploaded from path E:\IMAGES\pic001.jpg
string imagename = fileupload1.filename ....
(it results:- imagename=pic001.jpg)
now at point FileAccess.Read it throws exception that :
"Could not found C:\MyDocuments\Project\pic001.jpeg"
where: C:\MyDocuments\Project is the root path for my project.
PLEASE tell me how to solve thisss so i could upload image file from any path from the system??
Thanks,
Regards,
SANA
$@N@
|
|
|
|
|
well how about that, using your exact thread title in google[^] gives a bunch of really useful pages right at the start of the search results.
How about you read the documentation for the file upload control, and if its still not clear feel free to post back
|
|
|
|
|
|
I think you are going about this in the wrong fashion - the upload control has a property called PostedFile that will contain the data that has been uploaded - you need to access this.
Your code above is running on your server, so has no way of accessing the client's machine...
There are a number of good articles out there about doing this.
|
|
|
|
|
|
Try in html page. It has a property called value where u get the path of the image.
|
|
|
|
|
Hey, guys.
Using Sql Server stored procs is pretty painless in general, but I'm having a little trouble with a GridView scenario (VS 2008).
I can point the data source .SelectCommand to the name of the stored proc, and I can create and add parameters. However, for the particular type of param that's used in this case (as opposed to the general SqlCommand scenario), I'm not getting the expected results when assigning the value to that param at runtime. There's overloads of the routine to add params that takes the param id, type and value, but at runtime I don't get any data back from the call.
Using a "Select * from yada yada" in the SelectCommand works fine, and when I run the stored proc from Sql Server with the value I'm passing in, I get the expected data as well. Just not when using a proc name in the SelectCommand and add param approach with the data source and grid view.
Been googling quite a bit and can't seem to find any examples for this. Anyone know of a working code snippet they could point me to?
Thanks,
|
|
|
|
|
I don't think your problem has anything to do with the grid view.
I'm guessing you simply forgot to set the commmandType of the SQLCommand to StoredProdcedure.
I didn't get any requirements for the signature
|
|
|
|
|
Hi, Todd.
Thanks for taking the time. I did set the command type to stored proc, allocated a new param, and added it using the overload that allows me to specify paramater name, data type and value.
Don't have the code handy at the moment, but as best I can tell I'm following all the logical steps. Clearly, however, I'm missing something.
|
|
|
|
|
I've created my ASP.NET form using HTML <table> </table> tags, however, even though the controls are hidden, there is extra white space within the displayed page.
The problem seems to be that the table does not automatically adjust the borders to fit the 'visible' controls.
Please let me know where to submit screenshots to give a better idea of what I'm talking abt.
<td style="width: 108px; height: 50px;">
<br />
<asp:TextBox ID="txtIdealDeliveryDate" runat="server" Width="95px"></asp:TextBox>&nbsp;
&nbsp;<asp:Button ID="btnIdealDeliveryDate" runat="server" Text=">>" Visible="False" Width="45px" OnClick="btnIdealDeliveryDate_Click" />&nbsp;
<asp:Calendar ID="calIdealDeliveryDate" runat="server" Font-Names="Arial" Font-Size="10pt"
SelectedDate="2009-12-31" Enabled="False" VisibleDate="2009-12-31" Width="207px"></asp:Calendar>
&nbsp;
<span style="font-family:
// This should be invisible hence, I would like the table to adjust automatically when this is invisible. The problem is that there's a lot of
whitespace.
Arial"></span>
</td>
Jon
|
|
|
|
|
Use some css to control the display.
object.style.display = 'none' //No white space
object.style.visibility = 'hidden'; //White space
I didn't get any requirements for the signature
|
|
|
|
|
Can you show me where to include the css?
Jon
|
|
|
|
|
How i can fetch the stock market values in my asp.net application
hi this is rakesh
|
|
|
|
|
you will have to use RSS feeds or web services to accomplish this functionality in asp.net.
umerumerumer
|
|
|
|
|
If you are okay with delayed tick data then there are more options for you. You could use one of the free web services to get the data. Some of these are:
http://www.xignite.com/xquotes.asmx?op=GetQuote
http://www.extensio.com/websrv
http://www.swanandmokashi.com/HomePage/WebServices/
http://www.webservicex.net/stockquote.asmx
http://www.gama-system.com/webservices
http://www.serviceobjects.com/products/dots_fastquote.asp?zut=XMS1007
http://glkev.webs.innerhost.com/
http://www.xmethods.com/ve2/ViewListing.po?key=uuid:889A05A5-5C03-AD9B-D456-0E54A527EDEE"
Yahoo also has RSS feed for Financial information. You can call http://finance.yahoo.com/q?s=msft and then parse the result.
I didn't read the terms and conditions for any of these so be sure to check them out.
|
|
|
|
|
How to download multiple files in single HttpResponse..
like Save attachment option in outlook.
Regards
Radhakrishnan G.
|
|
|
|
|
That is not possible. You can only send one file in each response.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
as Guffa said you cannot send multiple files in single response.
if you want bit complex solution then, you can add a "Download All" link, and when user click on it. you can zip all the files on the server for that mail and send the .zip file to user.
Yahoo Mail is doing the same way.
|
|
|
|
|
my string is
strCmd = strCmd & " and (StartDate>='" & CldStartDate.SelectedDate.Date & "' and EndDate<='" & CldEndDate.SelectedDate.Date & "')"
but i save my date time 17-12-2009 00:00:00 this format it give error not convesion in date time properly
|
|
|
|
|
Try using
convert(datetime,Convert(varchar(20),startdate, 101),101) >
convert(datetime,Convert(varchar(20),CldStartDate.SelectedDate.Date.ToString("MM/dd/yyyy"), 101),101)
|
|
|
|
|
Hi,
I am create a custom server control. This control contains panel , check box list.check box list is reside in panel. While mouse getting out of the panel selected Items of check box list must display as alert. I tried this as follows,
In WebCustomControl1.cs,
private Panel _panel;
private CheckBoxList _chkList;
public override ControlCollection Controls
{
get
{
EnsureChildControls();
return base.Controls;
}
}
protected override void CreateChildControls()
{
string strItems;
string[] StrArrItem = null;
char cSplitChar = ',';
int intLegth = 0;
_panel = new Panel();
_chkList = new CheckBoxList();
_panel.ID = "Panel1";
_chkList.ID = "DDList";
_chkList.BorderColor = Color.White;
_chkList.BorderStyle = BorderStyle.Solid;
_chkList.Width = Unit.Percentage(100);
strItems = AddItem;
StrArrItem = strItems.Split(cSplitChar);
intLegth = StrArrItem.Length;
for (int i = 1; i < intLegth; i++)
{
_chkList.Items.Add(StrArrItem[i]);
}
_panel.Controls.Add(_chkList);
this.Controls.Add(_panel);
}
protected override void Render(HtmlTextWriter writer)
{
CreateCtrlLeave();
_panel.Attributes.Add("onmouseout", "CtrlLeave(); ");
_panel.RenderControl(writer);
}
public string AddItem
{
get
{
if (ViewState["Text"] != null)
{
_strAddItem = (String)ViewState["Text"];
if (_strAddItem.Length > 0)
{
_strAddItem = _strAddItem.Length > 0 ? _strAddItem.Substring(0, _strAddItem.Length - 1) : _strAddItem;
}
return ((_strAddItem == null) ? String.Empty : _strAddItem);
}
return ((_strAddItem == null) ? String.Empty : _strAddItem);
}
set
{
ViewState["Text"] = null;
_strAddItem += value + ",";
ViewState["Text"] = _strAddItem;
//ViewState["Text"] = value+",";
}
}
public void CreateCtrlLeave()
{
StringBuilder str = new StringBuilder();
str.Append("\n");
str.Append("function CheckItem(panel)\n");
str.Append("{\n");
str.Append("var chkList = panel.getElementsByTagName(\"input\"); \n");
str.Append("for(var i=0;i<chklist.length;i++)\n");>
str.Append("if(chkList[i].type==\"checkbox\" && chkList[i].checked)\n");
str.Append("{\n");
str.Append("alert(chkList[i].type)\n");
str.Append("}\n");
str.Append("}\n");
str.Append("");
if (!Page.IsClientScriptBlockRegistered("clients"))
{
Page.RegisterClientScriptBlock("clients", str.ToString());
}
}
After all i created 2 custom controls on my web page. But at runtime one error is getting like,Object expected.
Can anyone help me to solve this problem? please
Anu
|
|
|
|
|
Your code is looking for a client function called CtrlLeave, but i don't see that being created anywhere...
|
|
|
|
|
Dear All,
I am working on a website i have to use one third party control WYSIWYG Text editor which i have downloaded FCKeditor.
But problem is this how i add this in my solution explorer and how i can make use of it please tell me its really big issues for me.
Thanks in advance.
|
|
|
|