|
Hi,
I want to insert into the table using formview
for that here is my sample code
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
DeleteMethod="Delete" InsertMethod="Create" DataObjectTypeName=""
OldValuesParameterFormatString="{0}" SelectMethod="GetClients"
TypeName="ClientBLL" oninserting="ObjectDataSource2_Inserting">
</asp:ObjectDataSource>
and on oninserting event
protected void ObjectDataSource2_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
{
IDictionary paramsFromPage = e.InputParameters;
Client_Info oClient_Info = new Client_Info();
oClient_Info.FirstName = e.InputParameters["F_Name"].ToString();
oClient_Info.Salutation = e.InputParameters["Salutation"].ToString();
oClient_Info.Address = e.InputParameters["Address"].ToString();
oClient_Info.City = e.InputParameters["City"].ToString();
oClient_Info.ClientInfo = e.InputParameters["Client_Info"].ToString();
oClient_Info.Company = e.InputParameters["Company"].ToString();
oClient_Info.Country = e.InputParameters["Country"].ToString();//e.InputParameters["Country"] is not returned, why i cannot understand
oClient_Info.Designation = e.InputParameters["Designation"].ToString();
oClient_Info.Fax = e.InputParameters["Fax"].ToString();
oClient_Info.MiddleName = e.InputParameters["M_Name"].ToString();
oClient_Info.LastName = e.InputParameters["L_Name"].ToString();
oClient_Info.Mobile = e.InputParameters["Mobile"].ToString();
oClient_Info.Phone = e.InputParameters["Phone"].ToString();
oClient_Info.Pincode = e.InputParameters["Pincode"].ToString();
oClient_Info.PrimaryEmail = e.InputParameters["Pri_Email"].ToString();
oClient_Info.SecondaryEmail = e.InputParameters["Sec_Email"].ToString();
oClient_Info.State = e.InputParameters["State"].ToString();
oClient_Info.IsDeloitteClient = Convert.ToByte(e.InputParameters["Deloitte_Client"]);//e.InputParameters["Deloitte_Client"] is not returned, why i cannot understand
oClient_Info.IsViewableByOthers = Convert.ToByte(e.InputParameters["Viewable_By_Others"]);// this one too left out
//paramsFromPage.Clear();
paramsFromPage.Add("oClient_Info", oClient_Info);
}
but e.InputParameters returns only 17 parameters but it should return 20 parameters. The parameter Country(varchar) ,Deloitte_Client(bit), Viewable_By_Others(bit) left out by objectdatasource why it is so ?
modified on Monday, October 12, 2009 6:35 AM
|
|
|
|
|
How to assign right and left arrow key functions into html buttons
parthiban
|
|
|
|
|
I think you should rephrase your question.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Handle the one of the KeyXXX event(s) (KeyUp, KeyDown, KeyPress) either in JavaScript of Serverside.
only two letters away from being an asset
|
|
|
|
|
On my website I have several images showing, depending on the page.
The images are not locally stored, the html img tags reference remote servers.
The problem is that they don't always show.
Ive tried putting a random "?rand=123" value in the URL to prevent caching - no success.
If I copy the image links to another browser tab they show up and then refreshing the first page, the images come up immediately.
can someone please help?
With regards, S.Einarsson
|
|
|
|
|
Browser supports loading images from third-party/remote servers. problem is little bit odd. If the urls are dynamically generated, then make sure there wont be any encoding problem.
use mozilla firebug plugin to examine the rendered html
|
|
|
|
|
My problem with adobe PDF is very simple, how can i open a pdf file in IExplorer as read only without any toolbar controls / buttons / adobe features / mouse right click to show context menus, print commands , copy, export, CTRL A / Ctrl C available to users.
i tried, html Context , trapping right clicks, window.open styles and nothing works once i opened the pdf using
Window.open ("mydoc.pdf",,style)
i tried even on iframe, but still same result.
am using VB.Net 2.0 / ASP
can any experts here help me with this?
many thanks!
|
|
|
|
|
Hi,
Probably a really simple question but i can't seem to figure it out.
I have a URL address of C\........................
However I need some code that will automatically delete the end of the code, leaving the begging of the URL
If any body could help me that would be great
Many thanks
Dan
|
|
|
|
|
post an example so that urs question will be clear to understand....
Thanks and Regards
Sujit Kr. Mandal
|
|
|
|
|
url example C:\Desktop\App1\App1\bin\debug
I want the program to automatically delete the contents after the second App1 so it should look like this
C:\Desktop\App1
|
|
|
|
|
Depends on how do you want to trim it. If the length of string defines what is to be removed, then just use SubString method. If it is something else, then share that.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Try to search in google You can Find Many Ways
This is One Way..!
sting url1="C:\Desktop\App1\App1\bin\debug";
string[] url2 = url1.Split('\');
String Lasturl=url2[0].ToString ()+"\"+url2[1].ToString ()+"\"+url2[2].ToString ();
I think Youcan Also Use Regex..!and many more..!
|
|
|
|
|
For the given example, fine, this will work. But if the logic of removing parts is not based on number of levels(backslashes), this wont work.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
This Is only the iDEa To Him ..!
You Miss the Top line and the bottom line of my Post..!
Try To Read the Post fully..!
|
|
|
|
|
I said if the condition of trimming parts is different then? How does the split thing work? The condition maybe to remove the bin\debug part or something else. Unless you know that, how can you decide how to trim?
sashidhar wrote: Try To Read the Post fully..!
I did.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
d@nish wrote: I did.
i wrote:
Try to search in google You can Find Many Ways
I think Youcan Also Use Regex..!and many more..!
|
|
|
|
|
Hi Devs,
Is there any permanent fix to reduce the size of database transaction log. It is increasing massively and is causing a problem.
I have tried log shrink but that only reduces 15GB and the log file is over 470GB now.
Thank you
|
|
|
|
|
delete ldf file when next time attach the mdf file.
Thanks and Regards
Sujit Kr. Mandal
|
|
|
|
|
od you think it's a good way to delete transaction log ? If i delete and restrict the size but in few days it will reach the restricted size and again site will crash. I need a permanent solution to it.
|
|
|
|
|
Sujit Mandal wrote: delete ldf file when next time attach the mdf file
Mate, I wouldn't recommend doing this unless you're certain that you know what you're doing. I'm pretty sure you'll lose the ability to roll-back transactions and any uncommitted transactions will be lost.
|
|
|
|
|
Have you tried running a Transaction Log Backup? Doing so usually causes the transaction log to shrink considerably. You can schedule a transaction log backup to run outside of business hours each night to keep the file size to a minimum.
|
|
|
|
|
Yeah that's all in place but that's just temp. fix and very soon the size would again increase.
|
|
|
|
|
What version is this, and what recovery model are you using? Also, is this a production database, and to what point do you need to restore to in case of disaster?
Scott
|
|
|
|
|
what version do you mean ? It's a full recovery model and yes it is a production database and don't want to delete transaction log as we might have to recover good amount of data incase of some disaster.
|
|
|
|
|
I meant what version of SQL Server. And I wouldn't recommend deleting the transaction log (obviously not if it's production). But depending on how recently you would need to restore to in the case of a disaster, you might investigate the simple recovery model. What size is the data itself?
Scott
|
|
|
|